Skip to content

Commit

Permalink
Import only required from zhc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Nov 11, 2024
1 parent 49d8ff5 commit a58513a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/extension/otaUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type {Ota} from 'zigbee-herdsman-converters';

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

Check failure on line 1 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

'"zigbee-herdsman-converters"' has no exported member named 'Ota'. Did you mean 'ota'?

import assert from 'assert';
import path from 'path';

import bind from 'bind-decorator';
import stringify from 'json-stable-stringify-without-jsonify';

import {Zcl} from 'zigbee-herdsman';
import * as zhc from 'zigbee-herdsman-converters';
import {ota} from 'zigbee-herdsman-converters';

import Device from '../model/device';
import dataDir from '../util/data';
Expand Down Expand Up @@ -40,12 +42,12 @@ export default class OTAUpdate extends Extension {
let overrideIndexLocation = otaSettings.zigbee_ota_override_index_location;

// If the file name is not a full path, then treat it as a relative to the data directory
if (overrideIndexLocation && !zhc.ota.isValidUrl(overrideIndexLocation) && !path.isAbsolute(overrideIndexLocation)) {
if (overrideIndexLocation && !ota.isValidUrl(overrideIndexLocation) && !path.isAbsolute(overrideIndexLocation)) {

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Property 'isValidUrl' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Property 'isValidUrl' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'isValidUrl' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Property 'isValidUrl' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Property 'isValidUrl' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Property 'isValidUrl' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Property 'isValidUrl' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Property 'isValidUrl' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Property 'isValidUrl' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 45 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Property 'isValidUrl' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.
overrideIndexLocation = dataDir.joinPath(overrideIndexLocation);
}

// In order to support local firmware files we need to let zigbeeOTA know where the data directory is
zhc.ota.setConfiguration({
ota.setConfiguration({

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Property 'setConfiguration' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Property 'setConfiguration' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'setConfiguration' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Property 'setConfiguration' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Property 'setConfiguration' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Property 'setConfiguration' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Property 'setConfiguration' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Property 'setConfiguration' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Property 'setConfiguration' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 50 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Property 'setConfiguration' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.
dataDir: dataDir.getPath(),
overrideIndexLocation,
// TODO: implement me
Expand Down Expand Up @@ -91,11 +93,11 @@ export default class OTAUpdate extends Extension {
if (!check) return;

this.lastChecked[data.device.ieeeAddr] = Date.now();
let availableResult: zhc.Ota.UpdateAvailableResult | undefined;
let availableResult: Ota.UpdateAvailableResult | undefined;

try {
// never use 'previous' when responding to device request
availableResult = await zhc.ota.isUpdateAvailable(data.device.zh, data.device.otaExtraMetas, data.data as zhc.Ota.ImageInfo, false);
availableResult = await ota.isUpdateAvailable(data.device.zh, data.device.otaExtraMetas, data.data as Ota.ImageInfo, false);

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Property 'isUpdateAvailable' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Property 'isUpdateAvailable' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 100 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Property 'isUpdateAvailable' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.
} catch (error) {
logger.debug(`Failed to check if update available for '${data.device.name}' (${error})`);
}
Expand Down Expand Up @@ -136,7 +138,7 @@ export default class OTAUpdate extends Extension {

private getEntityPublishPayload(
device: Device,
state: zhc.Ota.UpdateAvailableResult | UpdateState,
state: Ota.UpdateAvailableResult | UpdateState,
progress?: number,
remaining?: number,
): UpdatePayload {
Expand Down Expand Up @@ -190,7 +192,7 @@ export default class OTAUpdate extends Extension {
logger.info(msg);

try {
const availableResult = await zhc.ota.isUpdateAvailable(device.zh, device.otaExtraMetas, undefined, downgrade);
const availableResult = await ota.isUpdateAvailable(device.zh, device.otaExtraMetas, undefined, downgrade);

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Property 'isUpdateAvailable' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Property 'isUpdateAvailable' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Property 'isUpdateAvailable' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 195 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Property 'isUpdateAvailable' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.
const msg = `${availableResult.available ? 'Update' : 'No update'} available for '${device.name}'`;
logger.info(msg);

Expand All @@ -208,7 +210,7 @@ export default class OTAUpdate extends Extension {

try {
const from_ = await this.readSoftwareBuildIDAndDateCode(device, 'immediate');
const fileVersion = await zhc.ota.update(device.zh, device.otaExtraMetas, downgrade, async (progress, remaining) => {
const fileVersion = await ota.update(device.zh, device.otaExtraMetas, downgrade, async (progress, remaining) => {

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Property 'update' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 18)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Property 'update' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 22)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'update' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / ci

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Property 'update' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 22)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Property 'update' does not exist on type 'typeof import("/home/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest, 20)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Property 'update' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 18)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Property 'update' does not exist on type 'typeof import("/Users/runner/work/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (macos-latest, 20)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Property 'update' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 20)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Property 'update' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 18)

Parameter 'remaining' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Property 'update' does not exist on type 'typeof import("D:/a/zigbee2mqtt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/lib/ota/index")'.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Parameter 'progress' implicitly has an 'any' type.

Check failure on line 213 in lib/extension/otaUpdate.ts

View workflow job for this annotation

GitHub Actions / tests (windows-latest, 22)

Parameter 'remaining' implicitly has an 'any' type.
let msg = `Update of '${device.name}' at ${progress.toFixed(2)}%`;
if (remaining) {
msg += `, ≈ ${Math.round(remaining / 60)} minutes remaining`;
Expand Down

0 comments on commit a58513a

Please sign in to comment.