mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
Support WSDCGQ11LM. #4
This commit is contained in:
parent
65ad81a7b6
commit
fc9a0be1e9
@ -26,7 +26,7 @@ const store = {}
|
||||
|
||||
const parsers = [
|
||||
{
|
||||
devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM'],
|
||||
devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM'],
|
||||
cid: 'genBasic',
|
||||
type: 'attReport',
|
||||
disablePublish: true,
|
||||
@ -72,13 +72,13 @@ const parsers = [
|
||||
}
|
||||
},
|
||||
{
|
||||
devices: ['WSDCGQ01LM'],
|
||||
devices: ['WSDCGQ01LM', 'WSDCGQ11LM'],
|
||||
cid: 'msTemperatureMeasurement',
|
||||
type: 'attReport',
|
||||
convert: (msg) => {return {temperature: parseFloat(msg.data.data['measuredValue']) / 100.0}}
|
||||
},
|
||||
{
|
||||
devices: ['WSDCGQ01LM'],
|
||||
devices: ['WSDCGQ01LM', 'WSDCGQ11LM'],
|
||||
cid: 'msRelativeHumidity',
|
||||
type: 'attReport',
|
||||
convert: (msg) => {return {humidity: parseFloat(msg.data.data['measuredValue']) / 100.0}}
|
||||
@ -150,6 +150,12 @@ const parsers = [
|
||||
type: 'attReport',
|
||||
convert: (msg) => {return {illuminance: msg.data.data['measuredValue']}}
|
||||
},
|
||||
{
|
||||
devices: ['WSDCGQ11LM'],
|
||||
cid: 'msPressureMeasurement',
|
||||
type: 'attReport',
|
||||
convert: (msg) => {return {pressure: msg.data.data['measuredValue']}}
|
||||
},
|
||||
|
||||
|
||||
// Ignore parsers (these message dont need parsing).
|
||||
@ -160,7 +166,7 @@ const parsers = [
|
||||
convert: () => null
|
||||
},
|
||||
{
|
||||
devices: ['WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM'],
|
||||
devices: ['WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM'],
|
||||
cid: 'genBasic',
|
||||
type: 'devChange',
|
||||
convert: () => null
|
||||
@ -177,6 +183,24 @@ const parsers = [
|
||||
type: 'devChange',
|
||||
convert: () => null
|
||||
},
|
||||
{
|
||||
devices: ['WSDCGQ11LM'],
|
||||
cid: 'msTemperatureMeasurement',
|
||||
type: 'devChange',
|
||||
convert: () => null
|
||||
},
|
||||
{
|
||||
devices: ['WSDCGQ11LM'],
|
||||
cid: 'msRelativeHumidity',
|
||||
type: 'devChange',
|
||||
convert: () => null
|
||||
},
|
||||
{
|
||||
devices: ['WSDCGQ11LM'],
|
||||
cid: 'msPressureMeasurement',
|
||||
type: 'devChange',
|
||||
convert: () => null
|
||||
},
|
||||
];
|
||||
|
||||
module.exports = parsers;
|
||||
|
@ -52,6 +52,36 @@ const homeassistant = {
|
||||
command_topic: true
|
||||
}
|
||||
},
|
||||
'sensor_humidity': {
|
||||
type: 'sensor',
|
||||
object_id: 'humidity',
|
||||
discovery_payload: {
|
||||
unit_of_measurement: '%',
|
||||
icon: 'mdi:water-percent',
|
||||
value_template: '{{ value_json.humidity }}',
|
||||
json_attributes: ['battery'],
|
||||
}
|
||||
},
|
||||
'sensor_temperature': {
|
||||
type: 'sensor',
|
||||
object_id: 'temperature',
|
||||
discovery_payload: {
|
||||
unit_of_measurement: '°C',
|
||||
icon: 'mdi:temperature-celsius',
|
||||
value_template: '{{ value_json.temperature }}',
|
||||
json_attributes: ['battery'],
|
||||
}
|
||||
},
|
||||
'sensor_pressure': {
|
||||
type: 'sensor',
|
||||
object_id: 'pressure',
|
||||
discovery_payload: {
|
||||
unit_of_measurement: 'Pa',
|
||||
icon: 'mdi:speedometer',
|
||||
value_template: '{{ value_json.pressure }}',
|
||||
json_attributes: ['battery'],
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const devices = {
|
||||
@ -73,6 +103,13 @@ const devices = {
|
||||
description: 'MiJia temperature & humidity sensor ',
|
||||
supports: 'temperature and humidity',
|
||||
},
|
||||
'lumi.weather': {
|
||||
model: 'WSDCGQ11LM',
|
||||
vendor: 'Xiaomi',
|
||||
description: 'Aqara temperature, humidity and pressure sensor',
|
||||
supports: 'temperature, humidity and pressure',
|
||||
homeassistant: [homeassistant.sensor_temperature, homeassistant.sensor_humidity, homeassistant.sensor_pressure]
|
||||
},
|
||||
'lumi.sensor_motion': {
|
||||
model: 'RTCGQ01LM',
|
||||
vendor: 'Xiaomi',
|
||||
|
@ -4,12 +4,6 @@
|
||||
*/
|
||||
|
||||
const plannedToSupport = [
|
||||
{
|
||||
model: 'WSDCGQ11LM',
|
||||
description: 'Aqara temperature & humidity sensor',
|
||||
supports: '-',
|
||||
vendor: 'Xiaomi',
|
||||
},
|
||||
{
|
||||
model: 'SJCGQ11LM',
|
||||
description: 'Aqara water leak sensor',
|
||||
|
Loading…
Reference in New Issue
Block a user