Skip to content

Instantly share code, notes, and snippets.

@pantherale0
Created November 22, 2023 22:20
Show Gist options
  • Save pantherale0/cca06b9669c07e68addd22d74f0e555d to your computer and use it in GitHub Desktop.
Save pantherale0/cca06b9669c07e68addd22d74f0e555d to your computer and use it in GitHub Desktop.
_TZE204_vqaajp1a
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = [
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_vqaajp1a']),
model: 'Boiler Switch',
vendor: 'TuYa',
description: 'Boiler Switch',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
meta: {
tuyaDatapoints: [
[1, 'switch', tuya.valueConverter.trueFalse0],
[14, 'power_on_behavior', tuya.valueConverter.powerOnBehaviorEnum],
[16, 'backlight', tuya.valueConverter.trueFalse0],
[21, 'current', tuya.valueConverter.raw],
[22, 'power', tuya.valueConverter.raw],
[23, 'voltage', tuya.valueConverter.raw],
[101, 'boost_time', tuya.valueConverter.raw],
[102, 'child_lock', tuya.valueConverter.lockUnlock],
[103, 'work_time', tuya.valueConverter.raw],
[104, 'total_time', tuya.valueConverter.raw]
]
},
exposes: [e.current(), e.voltage(), e.power(), e.child_lock(), e.boost_time(), e.switch(),
e.power_on_behavior().withAccess(ea.STATE_SET),
e.numeric('work_time', ea.GET).withDescription("Total work time"),
e.numeric('total_time', ea.GET).withDescription("Total time")],
},
];
module.exports = definition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment