mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
Action and click trigger for multiple endpoints and 511.344 / ZG2819S support (#3289)
* Home Assistant support for ZG2819S/511.344 * Added 'homeassistant_legacy_triggers' support for devices with multiple endpoints * Changed code style to pass lint test * Reverted fix for the action and click trigger to send an empty message for devices with multiple endpoints * Home Assistant support for the updated ZG2819S converter * Update homeassistant.js Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
parent
4970d1a927
commit
418b3d1e5d
@ -288,6 +288,14 @@ const cfg = {
|
|||||||
value_template: '{{ value_json.action }}',
|
value_template: '{{ value_json.action }}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'sensor_action_color': {
|
||||||
|
type: 'sensor',
|
||||||
|
object_id: 'action_color',
|
||||||
|
discovery_payload: {
|
||||||
|
value_template: '{{ value_json.action_color }}',
|
||||||
|
icon: 'mdi:palette',
|
||||||
|
},
|
||||||
|
},
|
||||||
'sensor_brightness': {
|
'sensor_brightness': {
|
||||||
type: 'sensor',
|
type: 'sensor',
|
||||||
object_id: 'brightness',
|
object_id: 'brightness',
|
||||||
@ -1498,6 +1506,7 @@ const mapping = {
|
|||||||
'TH1300ZB': [cfg.thermostat()],
|
'TH1300ZB': [cfg.thermostat()],
|
||||||
'SP 220': [cfg.switch],
|
'SP 220': [cfg.switch],
|
||||||
'511.040': [cfg.light_brightness_colortemp_colorxy],
|
'511.040': [cfg.light_brightness_colortemp_colorxy],
|
||||||
|
'511.344': [cfg.sensor_battery, cfg.sensor_action, cfg.sensor_action_color],
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(mapping).forEach((key) => {
|
Object.keys(mapping).forEach((key) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user