![]() |
|
Comfort2MQTT with Home Assistant Part 2C - refresh Comfort2MQTT - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Software Applications (https://www.comfortforums.com/forum-4.html) +--- Forum: Comfort with Home Assistant (https://www.comfortforums.com/forum-143.html) +--- Thread: Comfort2MQTT with Home Assistant Part 2C - refresh Comfort2MQTT (/thread-5605.html) |
Comfort2MQTT with Home Assistant Part 2C - refresh Comfort2MQTT - slychiu - 01-25-2025 When Home Assistant Restarts (Not Reload), it only restarts Home Assistant itself, all Add-ons remain running which could lead to some entities displaying an Unknown status. This status will update on the next change but for Alarm sensors that is not acceptable. A workaround to the problem is to Restart, or better yet, Refresh the Comfort to MQTT Add-on when Home Assistant restarts or when the configuration.yaml file is reloaded. Go to Settings > Devices and Services > Integrations. Look for Home Assistant Supervisor ![]() In the HA supervisor page look for Services and click on it. Select ComfortMQTT. Select Sensors ![]() Under Sensors you will see Running. Click on that it will show Disabled. ![]() ![]() Click on the gear icon. at the bottom there is a button to Enable it. Do that and UPDATE it. message says the entities will be added to Home assistant in 30 seconds. Make an automation \"When Home Assistant MQTT Configuration changes then refresh Comfort\" Go to File Editor, look for automations.yaml and add the text- id: 0987654321 alias: Refresh Comfort to MQTT Add-on description: \'When Home Assistant MQTT Configuration changes then refresh Comfort to MQTT entities.\' triggers: - event_type: call_service event_data: domain: mqtt service: reload trigger: event conditions: - condition: state entity_id: binary_sensor.comfort_to_mqtt_running state: \'on\' actions: - alias: Request a Refresh of all MQTT entities without a full Add-on reload data: topic: comfort2mqtt/alarm/refresh payload: 0 qos: \'2\' action: mqtt.publish mode: single Now if you restart Home assistant or make a change to configuration.yaml the states of the Binary sensors ie doors, windows and other sensors will show the state and not Unknown For part 3 go to http://www.comfortforums.com/forum143/5576.html |