deiger / Alarm

Code to connect and control alarms by PIMA.
GNU General Public License v3.0
16 stars 11 forks source link

Separating the LWT state from the alarm state #10

Closed maorcc closed 3 years ago

maorcc commented 3 years ago

Separating the LWT state from the alarm state is needed to allow simple integration with home-assistant, as HA requires a constant string for representing "online" availability.

Separating the LWT to a separate topic also allows making the LWT messages Retained. This approach is consistent with the Tasmota devices' behavior. More specifically, it allows the alarm to announce its Online state when it starts, and even when HA is restarted after the alarm announced that it is online, it would still know about the correct state. An alternative approach can be to notify about the "online" state periodically.

maorcc commented 3 years ago

@deiger, do you plan to merge this pull request soon?

deiger commented 3 years ago

I thought I already pulled it, sorry.