zigbee-herdsman-converters 14.0.359 → 14.0.360
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/converters/toZigbee.js +6 -2
- package/devices/climax.js +14 -0
- package/devices/danfoss.js +1 -1
- package/devices/gledopto.js +1 -1
- package/devices/hive.js +1 -1
- package/devices/popp.js +1 -1
- package/devices/tuya.js +33 -2
- package/devices/ynoa.js +21 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/toZigbee.js
CHANGED
|
@@ -785,7 +785,7 @@ const converters = {
|
|
|
785
785
|
const {message} = meta;
|
|
786
786
|
const transition = utils.getTransition(entity, 'brightness', meta);
|
|
787
787
|
const turnsOffAtBrightness1 = utils.getMetaValue(entity, meta.mapped, 'turnsOffAtBrightness1', 'allEqual', false);
|
|
788
|
-
|
|
788
|
+
let state = message.hasOwnProperty('state') ? message.state.toLowerCase() : undefined;
|
|
789
789
|
let brightness = undefined;
|
|
790
790
|
if (message.hasOwnProperty('brightness')) {
|
|
791
791
|
brightness = Number(message.brightness);
|
|
@@ -803,7 +803,11 @@ const converters = {
|
|
|
803
803
|
}
|
|
804
804
|
|
|
805
805
|
if (state === 'toggle' || state === 'off' || (brightness === undefined && state === 'on')) {
|
|
806
|
-
if (transition.specified
|
|
806
|
+
if (transition.specified) {
|
|
807
|
+
if (state === 'toggle') {
|
|
808
|
+
state = meta.state.state === 'ON' ? 'OFF' : 'ON';
|
|
809
|
+
}
|
|
810
|
+
|
|
807
811
|
if (state === 'off' && meta.state.brightness && meta.state.state === 'ON') {
|
|
808
812
|
// https://github.com/Koenkk/zigbee2mqtt/issues/2850#issuecomment-580365633
|
|
809
813
|
// We need to remember the state before turning the device off as we need to restore
|
package/devices/climax.js
CHANGED
|
@@ -121,4 +121,18 @@ module.exports = [
|
|
|
121
121
|
exposes: [e.battery_low(), e.tamper(), e.action(['emergency', 'panic', 'disarm', 'arm_all_zones', 'arm_day_zones']),
|
|
122
122
|
],
|
|
123
123
|
},
|
|
124
|
+
{
|
|
125
|
+
zigbeeModel: ['PRL_00.00.03.04TC'],
|
|
126
|
+
model: 'PRL-1ZBS-12/24V',
|
|
127
|
+
vendor: 'Climax',
|
|
128
|
+
description: 'Zigbee 12-24V relay controller',
|
|
129
|
+
extend: extend.switch(),
|
|
130
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
131
|
+
const endpoint = device.getEndpoint(1);
|
|
132
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
133
|
+
await reporting.onOff(endpoint);
|
|
134
|
+
device.powerSource = 'Mains (single phase)';
|
|
135
|
+
device.save();
|
|
136
|
+
},
|
|
137
|
+
},
|
|
124
138
|
];
|
package/devices/danfoss.js
CHANGED
|
@@ -72,7 +72,7 @@ module.exports = [
|
|
|
72
72
|
'thermostats in the room. The gateway must update load_room_mean if enabled.'),
|
|
73
73
|
exposes.numeric('load_room_mean', ea.ALL)
|
|
74
74
|
.withDescription('Mean radiator load for room calculated by gateway for load balancing purposes (-8000=undefined)')
|
|
75
|
-
.withValueMin(-8000).withValueMax(
|
|
75
|
+
.withValueMin(-8000).withValueMax(2000),
|
|
76
76
|
exposes.numeric('load_estimate', ea.STATE_GET)
|
|
77
77
|
.withDescription('Load estimate on this radiator')],
|
|
78
78
|
ota: ota.zigbeeOTA,
|
package/devices/gledopto.js
CHANGED
|
@@ -237,7 +237,7 @@ module.exports = [
|
|
|
237
237
|
vendor: 'Gledopto',
|
|
238
238
|
ota: ota.zigbeeOTA,
|
|
239
239
|
description: 'Zigbee LED Controller RGB+CCT (pro)',
|
|
240
|
-
extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
|
|
240
|
+
extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
|
|
241
241
|
meta: {disableDefaultResponse: true},
|
|
242
242
|
},
|
|
243
243
|
{
|
package/devices/hive.js
CHANGED
|
@@ -206,7 +206,7 @@ module.exports = [
|
|
|
206
206
|
'thermostats in the room. The gateway must update load_room_mean if enabled.'),
|
|
207
207
|
exposes.numeric('load_room_mean', ea.ALL)
|
|
208
208
|
.withDescription('Mean radiator load for room calculated by gateway for load balancing purposes (-8000=undefined)')
|
|
209
|
-
.withValueMin(-8000).withValueMax(
|
|
209
|
+
.withValueMin(-8000).withValueMax(2000),
|
|
210
210
|
exposes.numeric('load_estimate', ea.STATE_GET)
|
|
211
211
|
.withDescription('Load estimate on this radiator')],
|
|
212
212
|
configure: async (device, coordinatorEndpoint, logger) => {
|
package/devices/popp.js
CHANGED
|
@@ -65,7 +65,7 @@ module.exports = [
|
|
|
65
65
|
'thermostats in the room. The gateway must update load_room_mean if enabled.'),
|
|
66
66
|
exposes.numeric('load_room_mean', ea.ALL)
|
|
67
67
|
.withDescription('Mean radiator load for room calculated by gateway for load balancing purposes (-8000=undefined)')
|
|
68
|
-
.withValueMin(-8000).withValueMax(
|
|
68
|
+
.withValueMin(-8000).withValueMax(2000),
|
|
69
69
|
exposes.numeric('load_estimate', ea.STATE_GET)
|
|
70
70
|
.withDescription('Load estimate on this radiator')],
|
|
71
71
|
ota: ota.zigbeeOTA,
|
package/devices/tuya.js
CHANGED
|
@@ -7,12 +7,42 @@ const reporting = require('../lib/reporting');
|
|
|
7
7
|
const extend = require('../lib/extend');
|
|
8
8
|
const e = exposes.presets;
|
|
9
9
|
const ea = exposes.access;
|
|
10
|
-
|
|
10
|
+
const libColor = require('../lib/color');
|
|
11
|
+
const utils = require('../lib/utils');
|
|
11
12
|
|
|
12
13
|
const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
|
|
13
14
|
'_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
|
|
14
15
|
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_v1pdxuqq'];
|
|
15
16
|
|
|
17
|
+
const tzLocal = {
|
|
18
|
+
TS0504B_color: {
|
|
19
|
+
key: ['color'],
|
|
20
|
+
convertSet: async (entity, key, value, meta) => {
|
|
21
|
+
const color = libColor.Color.fromConverterArg(value);
|
|
22
|
+
console.log(color);
|
|
23
|
+
const enableWhite =
|
|
24
|
+
(color.isRGB() && (color.rgb.red === 1 && color.rgb.green === 1 && color.rgb.blue === 1)) ||
|
|
25
|
+
// Zigbee2MQTT frontend white value
|
|
26
|
+
(color.isXY() && (color.xy.x === 0.3125 || color.xy.y === 0.32894736842105265)) ||
|
|
27
|
+
// Home Assistant white color picker value
|
|
28
|
+
(color.isXY() && (color.xy.x === 0.323 || color.xy.y === 0.329));
|
|
29
|
+
|
|
30
|
+
if (enableWhite) {
|
|
31
|
+
await entity.command('lightingColorCtrl', 'tuyaRgbMode', {enable: false});
|
|
32
|
+
const newState = {color_mode: 'xy'};
|
|
33
|
+
if (color.isXY()) {
|
|
34
|
+
newState.color = color.xy;
|
|
35
|
+
} else {
|
|
36
|
+
newState.color = color.rgb.gammaCorrected().toXY().rounded(4);
|
|
37
|
+
}
|
|
38
|
+
return {state: libColor.syncColorState(newState, meta.state, entity, meta.options, meta.logger)};
|
|
39
|
+
} else {
|
|
40
|
+
return await tz.light_color.convertSet(entity, key, value, meta);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
16
46
|
module.exports = [
|
|
17
47
|
{
|
|
18
48
|
zigbeeModel: ['TS0203'],
|
|
@@ -103,7 +133,7 @@ module.exports = [
|
|
|
103
133
|
{
|
|
104
134
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_rk2yzt0u'},
|
|
105
135
|
{modelID: 'TS0001', manufacturerName: '_TZ3000_o4cjetlm'}, {manufacturerName: '_TZ3000_o4cjetlm'},
|
|
106
|
-
{modelID: 'TS0001', manufacturerName: '_TZ3000_iedbgyxt'}],
|
|
136
|
+
{modelID: 'TS0001', manufacturerName: '_TZ3000_iedbgyxt'}, {modelID: 'TS0001', manufacturerName: '_TZ3000_h3noz0a5'}],
|
|
107
137
|
model: 'ZN231392',
|
|
108
138
|
vendor: 'TuYa',
|
|
109
139
|
description: 'Smart water/gas valve',
|
|
@@ -156,6 +186,7 @@ module.exports = [
|
|
|
156
186
|
vendor: 'TuYa',
|
|
157
187
|
description: 'Zigbee RGBW light',
|
|
158
188
|
extend: extend.light_onoff_brightness_color(),
|
|
189
|
+
toZigbee: utils.replaceInArray(extend.light_onoff_brightness_color().toZigbee, [tz.light_color], [tzLocal.TS0504B_color]),
|
|
159
190
|
meta: {applyRedFix: true},
|
|
160
191
|
},
|
|
161
192
|
{
|
package/devices/ynoa.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const exposes = require('../lib/exposes');
|
|
2
|
+
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
+
const reporting = require('../lib/reporting');
|
|
4
|
+
const e = exposes.presets;
|
|
5
|
+
|
|
6
|
+
module.exports = [
|
|
7
|
+
{
|
|
8
|
+
zigbeeModel: ['ZBT-DIMSwitch-D0000'],
|
|
9
|
+
model: '8718801528334',
|
|
10
|
+
vendor: 'Ynoa',
|
|
11
|
+
description: 'Remote control one button dimmer',
|
|
12
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
|
|
13
|
+
exposes: [e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop']), e.battery()],
|
|
14
|
+
toZigbee: [],
|
|
15
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
16
|
+
const endpoint = device.getEndpoint(1);
|
|
17
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
18
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
package/npm-shrinkwrap.json
CHANGED