Last active
April 14, 2023 10:20
-
-
Save Koenkk/86ea747a683752fd6ff9390abf9fda55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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 e = exposes.presets; | |
const ea = exposes.access; | |
const definition = { | |
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_yojqa8xn']), | |
model: 'TS0601_gas_sensor', | |
vendor: 'TuYa', | |
description: 'Gas sensor', | |
fromZigbee: [tuya.fzDataPoints], | |
toZigbee: [tuya.tzDataPoints], | |
configure: tuya.configureMagicPacket, | |
exposes: [e.gas()], | |
meta: { | |
tuyaDatapoints: [ | |
[1, 'gas', tuya.valueConverter.true0ElseFalse], | |
[2, 'detected_gas', tuya.valueConverter.raw], | |
[6, 'alarm_ringtone', tuya.valueConverter.raw], | |
[7, 'alarm_time', tuya.valueConverter.raw], | |
[8, 'auto_detect', tuya.valueConverter.raw], | |
[9, 'auto_detect_result', tuya.valueConverter.raw], | |
[11, 'preheat', tuya.valueConverter.raw], | |
], | |
}, | |
}; | |
module.exports = definition; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've created the pr, please check the comments: Koenkk/zigbee-herdsman-converters#5065