updated z2m config for v2.0
This commit is contained in:
@@ -7,10 +7,6 @@ const e = exposes.presets;
|
||||
const ea = exposes.access;
|
||||
const tuya = require('zigbee-herdsman-converters/lib/tuya');
|
||||
|
||||
const tzDatapoints = {
|
||||
...tuya.tz.datapoints,
|
||||
key: ['switch', 'fault', 'alarm', 'battery', 'cleaning']
|
||||
}
|
||||
const definition = {
|
||||
fingerprint: [
|
||||
{
|
||||
@@ -18,12 +14,12 @@ const definition = {
|
||||
manufacturerName: '_TZE200_yltivvzb',
|
||||
},
|
||||
],
|
||||
model: 'Gidrolock Winner',
|
||||
model: 'Winner Zigbee',
|
||||
vendor: 'Gidrolock',
|
||||
description: 'Gidrolock smart water valve',
|
||||
description: 'Gidrolock smart water valve controller',
|
||||
fromZigbee: [tuya.fz.datapoints],
|
||||
toZigbee: [tzDatapoints],
|
||||
onEvent: tuya.onEventSetTime,
|
||||
toZigbee: [tuya.tz.datapoints],
|
||||
configure: tuya.configureMagicPacket,
|
||||
exposes: [
|
||||
exposes.presets.enum('fault', ea.STATE, ['low_battery', 'fault', 'lack_water', 'sensor_fault', 'motor_fault', 'low_temp']).withCategory('diagnostic'),
|
||||
exposes.presets.binary('switch', ea.STATE_SET, true, false ).withLabel('Valve status:'),
|
||||
@@ -38,12 +34,12 @@ const definition = {
|
||||
[101, 'alarm', tuya.valueConverter.raw],
|
||||
[102, 'battery', tuya.valueConverterBasic.lookup({'10': tuya.enum(0), '20': tuya.enum(1), '30': tuya.enum(2), '40': tuya.enum(3), '50': tuya.enum(4), '60': tuya.enum(5), '70': tuya.enum(6), '80': tuya.enum(7), '90': tuya.enum(8), '100': tuya.enum(9), '101': tuya.enum(10)})],
|
||||
[104, 'cleaning', tuya.valueConverter.raw]
|
||||
],
|
||||
]
|
||||
},
|
||||
|
||||
extend: [
|
||||
tuya.modernExtend.tuyaMagicPacket(),
|
||||
tuya.modernExtend.tuyaMagicPacket(),
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = definition;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user