deiger / Alarm

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

Retain status message #14

Closed pavius closed 3 years ago

pavius commented 3 years ago

Fixes alarm_control_panel.pima_alarm unavailable state when HA core is restarted and MQTT is used.

Scenario:

  1. Configure HA/MQTT. alarm_control_panel.pima_alarm state is armed/disarmed (correct)
  2. Restart HA core - alarm_control_panel.pima_alarm will be unavailable until the next status is posted to MQTT

By enabling retention of the status, we make sure the previously posted status is pushed to HA core when it connects to MQTT - allowing it to immediately see the correct status.