Add binary battery low sensor for HS1SA and HS3SA. https://github.com/Koenkk/zigbee2mqtt/issues/1159

This commit is contained in:
Koen Kanters 2019-02-26 20:59:33 +01:00
parent bef8a682ca
commit 709046db2a

View File

@ -76,6 +76,16 @@ const configurations = {
device_class: 'connectivity', device_class: 'connectivity',
}, },
}, },
'binary_sensor_battery_low': {
type: 'binary_sensor',
object_id: 'battery_low',
discovery_payload: {
payload_on: true,
payload_off: false,
value_template: '{{ value_json.battery_low}}',
device_class: 'battery',
},
},
// Sensor // Sensor
'sensor_illuminance': { 'sensor_illuminance': {
@ -452,12 +462,12 @@ const mapping = {
'900008-WW': [configurations.light_brightness], '900008-WW': [configurations.light_brightness],
'Mega23M12': [configurations.light_brightness_colortemp_colorxy], 'Mega23M12': [configurations.light_brightness_colortemp_colorxy],
'PSS-23ZBS': [configurations.switch], 'PSS-23ZBS': [configurations.switch],
'HS1SA': [configurations.binary_sensor_smoke], 'HS1SA': [configurations.binary_sensor_smoke, configurations.binary_sensor_battery_low],
'Z01-A19NAE26': [configurations.light_brightness_colortemp], 'Z01-A19NAE26': [configurations.light_brightness_colortemp],
'AC01353010G': [configurations.binary_sensor_occupancy, configurations.sensor_temperature], 'AC01353010G': [configurations.binary_sensor_occupancy, configurations.sensor_temperature],
'SP 120': [configurations.switch, configurations.sensor_power], 'SP 120': [configurations.switch, configurations.sensor_power],
'RB 248 T': [configurations.light_brightness_colortemp], 'RB 248 T': [configurations.light_brightness_colortemp],
'HS3SA': [configurations.binary_sensor_smoke], 'HS3SA': [configurations.binary_sensor_smoke, configurations.binary_sensor_battery_low],
'HS1DS': [configurations.binary_sensor_contact], 'HS1DS': [configurations.binary_sensor_contact],
'HS1WL': [configurations.binary_sensor_water_leak], 'HS1WL': [configurations.binary_sensor_water_leak],
'421786': [configurations.light_brightness], '421786': [configurations.light_brightness],