Skip to content

Commit 2e06854

Browse files
committed
Update zhc to 18.25.1
1 parent aab3f0f commit 2e06854

File tree

876 files changed

+4963
-2136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

876 files changed

+4963
-2136
lines changed

docgen/missing_device_images.ts

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ export async function downloadImage(url: string, path: string) {
3030
r();
3131
});
3232
});
33-
33+
}
34+
35+
export async function ensureJpg(imagePath: string) {
36+
if (path.parse(imagePath).ext !== '.jpg') {
37+
const imagePathJpg = `${path.join(missingImagesPath, path.parse(imagePath).name)}.jpg`;
38+
await easyimage.convert({src: imagePath, dst: imagePathJpg});
39+
fs.rmSync(imagePath);
40+
imagePath = imagePathJpg;
41+
}
42+
return imagePath;
3443
}
3544

3645
export async function downloadMissing() {
@@ -52,12 +61,7 @@ export async function downloadMissing() {
5261
await downloadImage(image.url, imagePath);
5362

5463
// Convert to jpg
55-
if (path.parse(imagePath).ext !== '.jpg') {
56-
const imagePathJpg = `${path.join(missingImagesPath, path.parse(imagePath).name)}.jpg`;
57-
await easyimage.convert({src: imagePath, dst: imagePathJpg});
58-
fs.rmSync(imagePath);
59-
imagePath = imagePathJpg;
60-
}
64+
imagePath = await ensureJpg(imagePath);
6165

6266
// Make sqaure
6367
const info = await easyimage.info(imagePath);
@@ -78,18 +82,18 @@ export async function downloadMissing() {
7882

7983
async function moveMissing() {
8084
for (const file of fs.readdirSync(missingImagesPath)) {
81-
if (path.parse(file).ext === '.jpg') {
82-
try {
83-
const match = file.match('(.+)_\\d+\\.jpg');
84-
if (!match) throw new Error(`Failed to match '${file}'`)
85-
const source = path.join(missingImagesPath, file);
86-
const target = path.join(imageBaseDir, `${match[1]}.jpg`);
87-
fs.copyFileSync(source, target);
88-
const size = 150;
89-
await easyimage.resize({width: size, height: size, src: target, dst: target});
90-
} catch (error) {
91-
console.error(`Failed to handle '${file}' (${error})`)
92-
}
85+
try {
86+
let source = path.join(missingImagesPath, file);
87+
source = await ensureJpg(source);
88+
const name = path.basename(source);
89+
const match = name.match('(.+)_\\d+\\.jpg');
90+
if (!match) throw new Error(`Failed to match '${name}'`)
91+
const target = path.join(imageBaseDir, `${match[1]}.jpg`);
92+
fs.copyFileSync(source, target);
93+
const size = 150;
94+
await easyimage.resize({width: size, height: size, src: target, dst: target});
95+
} catch (error) {
96+
console.error(`Failed to handle '${file}' (${error})`)
9397
}
9498
}
9599
console.log('Done!');

docs/devices/014G2461.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The minimal value is `0` and the maximum value is `255`.
5757
The unit of this value is `lqi`.
5858

5959
### Battery (numeric)
60-
Remaining battery in %, can take up to 24 hours before reported..
60+
Remaining battery in %, can take up to 24 hours before reported.
6161
Value can be found in the published state on the `battery` property.
6262
It's not possible to read (`/get`) or write (`/set`) this value.
6363
The minimal value is `0` and the maximum value is `100`.
@@ -138,7 +138,7 @@ Scheduled change of the setpoint. Alternative method for changing the setpoint.
138138
Value can be found in the published state on the `occupied_heating_setpoint_scheduled` property.
139139
To read (`/get`) the value publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"occupied_heating_setpoint_scheduled": ""}`.
140140
To write (`/set`) a value publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/set` with payload `{"occupied_heating_setpoint_scheduled": NEW_VALUE}`.
141-
The minimal value is `5` and the maximum value is `32`.
141+
The minimal value is `5` and the maximum value is `35`.
142142
The unit of this value is `°C`.
143143

144144
### External measured room sensor (numeric)

docs/devices/0402946.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To read the current state of this lock publish a message to topic `zigbee2mqtt/F
6262
This lock exposes a lock state which can be found in the published state under the `lock_state` property. It's not possible to read (`/get`) or write (`/set`) this value. The possible values are: `not_fully_locked`, `locked`, `unlocked`.
6363

6464
### Battery (numeric)
65-
Remaining battery in %, can take up to 24 hours before reported..
65+
Remaining battery in %, can take up to 24 hours before reported.
6666
Value can be found in the published state on the `battery` property.
6767
It's not possible to read (`/get`) or write (`/set`) this value.
6868
The minimal value is `0` and the maximum value is `100`.

docs/devices/064873.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This device supports OTA updates, for more information see [OTA updates](../guid
3737
## Exposes
3838

3939
### Battery (numeric)
40-
Remaining battery in %, can take up to 24 hours before reported..
40+
Remaining battery in %, can take up to 24 hours before reported.
4141
Value can be found in the published state on the `battery` property.
4242
It's not possible to read (`/get`) or write (`/set`) this value.
4343
The minimal value is `0` and the maximum value is `100`.

docs/devices/067646.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This device supports OTA updates, for more information see [OTA updates](../guid
3636
## Exposes
3737

3838
### Battery (numeric)
39-
Remaining battery in %, can take up to 24 hours before reported..
39+
Remaining battery in %, can take up to 24 hours before reported.
4040
Value can be found in the published state on the `battery` property.
4141
It's not possible to read (`/get`) or write (`/set`) this value.
4242
The minimal value is `0` and the maximum value is `100`.

docs/devices/067694.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This device supports OTA updates, for more information see [OTA updates](../guid
3939
## Exposes
4040

4141
### Battery (numeric)
42-
Remaining battery in %, can take up to 24 hours before reported..
42+
Remaining battery in %, can take up to 24 hours before reported.
4343
Value can be found in the published state on the `battery` property.
4444
It's not possible to read (`/get`) or write (`/set`) this value.
4545
The minimal value is `0` and the maximum value is `100`.

docs/devices/067755.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pageClass: device-page
3333
## Exposes
3434

3535
### Battery (numeric)
36-
Remaining battery in %, can take up to 24 hours before reported..
36+
Remaining battery in %, can take up to 24 hours before reported.
3737
Value can be found in the published state on the `battery` property.
3838
It's not possible to read (`/get`) or write (`/set`) this value.
3939
The minimal value is `0` and the maximum value is `100`.

docs/devices/067773.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ simulated_brightness:
7070
## Exposes
7171

7272
### Battery (numeric)
73-
Remaining battery in %, can take up to 24 hours before reported..
73+
Remaining battery in %, can take up to 24 hours before reported.
7474
Value can be found in the published state on the `battery` property.
7575
It's not possible to read (`/get`) or write (`/set`) this value.
7676
The minimal value is `0` and the maximum value is `100`.

docs/devices/067774.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ simulated_brightness:
5757
## Exposes
5858
5959
### Battery (numeric)
60-
Remaining battery in %, can take up to 24 hours before reported..
60+
Remaining battery in %, can take up to 24 hours before reported.
6161
Value can be found in the published state on the `battery` property.
6262
It's not possible to read (`/get`) or write (`/set`) this value.
6363
The minimal value is `0` and the maximum value is `100`.

docs/devices/07043M.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ It's not possible to read (`/get`) or write (`/set`) this value.
5151
If value equals `true` tamper is ON, if `false` OFF.
5252

5353
### Battery (numeric)
54-
Remaining battery in %, can take up to 24 hours before reported..
54+
Remaining battery in %, can take up to 24 hours before reported.
5555
Value can be found in the published state on the `battery` property.
5656
It's not possible to read (`/get`) or write (`/set`) this value.
5757
The minimal value is `0` and the maximum value is `100`.

0 commit comments

Comments
 (0)