Hello everyone, I would like to create an automation that checks the status of the internet connection every hour and if this is absent, restart the home assistant.
I created a new binary sensor:
binary_sensor:
- platform: ping
host: 8.8.8.8
count: 2
scan_interval: 1800
name: state_connection
And its automation:
alias: Restart connection
description: ''
trigger:
- platform: time_pattern
hours: '1'
condition:
- condition: state
entity_id: binary_sensor.state_connection
state: 'off'
action:
- service: homeassistant.restart
data: {}
mode: single
If I debug the automation, I get the message “No traces found” and I can’t understand if the automation would work or not.
Also, in the sensor settings I get this message “This entity (" binary_sensor.connection_state ") does not have a unique ID, therefore its settings cannot be managed from the user interface. See documentation for more details.”
The sensor works perfectly. How could I fix these errors?