It could happen that Ariela will lose connection / unable to connect to Home Assistant so it will not be able to send updates like geolocation, sensors informations etc. For this scenario, a new MQTT sensor was introduced called “Ariela Availability”. This MQTT sensor state will be equal to the last time Ariela had communicated with Home Assistant.
In order to enable this sensor, MQTT support must be enabled in both Ariela and Home Assistant. Once you do that, go to Ariela -> Settings -> MQTT -> Sensors and look for “Ariela Availability” entry. Once you enable this sensor, Home Assistant should automatic discover the new sensor, but if not click on the more info button and something like this should appear:
Use these instructions and copy them to your configuration.yaml in order to setup the availability sensor.
EXAMPLE OF AUTOMATION
Here is an automation that will run every 5 seconds and it will check if the last time Ariela was communicating with Home Assistant was 2 or more minutes ago. If this happen this example will turn off another automation.
- id: '1551861791394'
alias: Ariela Reset
trigger:
- platform: time_pattern
seconds: /5
condition:
- condition: template
value_template: '{{ (((as_timestamp(now()) | int) - 2*60) | timestamp_custom("%Y-%m-%d %H:%M:00")) >= states.sensor.galaxy_s8_available_status.state }}'
action:
- data:
entity_id: automation.new_automation
service: automation.turn_off