mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-02 10:01:37 +00:00
Support JTYJ-GD-01LM/BW. #4
This commit is contained in:
@@ -45,7 +45,7 @@ const store = {}
|
||||
|
||||
const parsers = [
|
||||
{
|
||||
devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM', 'SJCGQ11LM', 'MFKZQ01LM'],
|
||||
devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM', 'SJCGQ11LM', 'MFKZQ01LM', 'JTYJ-GD-01LM/BW'],
|
||||
cid: 'genBasic',
|
||||
type: 'attReport',
|
||||
convert: (msg) => {
|
||||
@@ -321,6 +321,12 @@ const parsers = [
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
devices: ['JTYJ-GD-01LM/BW'],
|
||||
cid: 'ssIasZone',
|
||||
type: 'statusChange',
|
||||
convert: (msg) => {return {smoke: msg.data.zoneStatus === 1}}
|
||||
},
|
||||
|
||||
// Ignore parsers (these message dont need parsing).
|
||||
{
|
||||
@@ -330,7 +336,7 @@ const parsers = [
|
||||
convert: () => null
|
||||
},
|
||||
{
|
||||
devices: ['WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM', 'SJCGQ11LM', 'MCCGQ01LM', 'RTCGQ01LM', 'WXKG01LM', 'WSDCGQ01LM'],
|
||||
devices: ['WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM', 'SJCGQ11LM', 'MCCGQ01LM', 'RTCGQ01LM', 'WXKG01LM', 'WSDCGQ01LM', 'JTYJ-GD-01LM/BW'],
|
||||
cid: 'genBasic',
|
||||
type: 'devChange',
|
||||
convert: () => null
|
||||
|
||||
@@ -105,6 +105,12 @@ const devices = {
|
||||
supports: 'on/off, power measurement',
|
||||
vendor: 'Xiaomi',
|
||||
},
|
||||
'lumi.sensor_smoke': {
|
||||
model: 'JTYJ-GD-01LM/BW',
|
||||
description: 'MiJia Honeywell smoke detector',
|
||||
supports: 'smoke',
|
||||
vendor: 'Xiaomi',
|
||||
},
|
||||
|
||||
// IKEA
|
||||
'TRADFRI bulb E27 WS opal 980lm': {
|
||||
|
||||
@@ -35,6 +35,17 @@ const configurations = {
|
||||
json_attributes: ['battery']
|
||||
}
|
||||
},
|
||||
'binary_sensor_smoke': {
|
||||
type: 'binary_sensor',
|
||||
object_id: 'smoke',
|
||||
discovery_payload: {
|
||||
payload_on: true,
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.smoke }}',
|
||||
device_class: 'smoke',
|
||||
json_attributes: ['battery']
|
||||
}
|
||||
},
|
||||
|
||||
// Sensor
|
||||
'sensor_illuminance': {
|
||||
@@ -197,6 +208,7 @@ const mapping = {
|
||||
'LED1536G5': [configurations.light_brightness_colortemp],
|
||||
'7146060PH': [configurations.light_brightness_colortemp_xy],
|
||||
'F7C033': [configurations.light_brightness],
|
||||
'JTYJ-GD-01LM/BW': [configurations.binary_sensor_smoke],
|
||||
};
|
||||
|
||||
// A map of all discoverd devices
|
||||
|
||||
Reference in New Issue
Block a user