OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
356 stars 92 forks source link

[feat] Include Device Status in HASS Json #718

Open jamesarbrown opened 4 years ago

jamesarbrown commented 4 years ago

It would be nice if we can push a connectivity device to hass to easily pickup failed zwave nodes

Working Example For a Fibaro Smart Implant { "type": "binary_sensor", "object_id": "connectivity", "discovery_payload": { "payload_on": true, "payload_off": false, "value_template": "{{ value_json.value }}", "device_class": "connectivity", "state_topic": "homeassistant/Gate/Gate/status", "json_attributes_topic": "homeassistant/Gate/Gate/status", "device": { "identifiers": [ "zwave2mqtt_0xd15fadb6_node20" ], "manufacturer": "FIBARO System", "model": "FGBS222 Smart Implant (0x1000)", "name": "Gate-Gate", "sw_version": "5.01" }, "name": "Gate-Gate_connectivity", "unique_id": "zwave2mqtt_0xd15fadb6_20-status" }, "discoveryTopic": "binary_sensor/Gate-Gate/status/config", "values": [ "status" ], "persistent": false, "ignoreDiscovery": false, "id": "binary_sensor_connectivity" }

robertsLando commented 4 years ago

@jamesarbrown would you like this to be extended to all devices or just for some? How would yout expect this to be implemented in the UI?

jamesarbrown commented 4 years ago

@robertsLando I think the connectivity is currently created by all devices on the mqtt broker, so I think my answer would be that the JSON should be generated for all, after all it will follow the same pattern always and you can always hide within HA