Every now and then I’m in a situation where an integration “needs attention”. Sometimes it takes quite a while before I notice this. Therefore my question: would it be possible to receive an alert when this happens? This would be a nice feature request in my opinion.
There’s a couple of tools to help with this.
Spook monitors configuration and dashboards for entities which don’t exist (which will be the case if an integration fails).
Watchman monitors for missing and unavailable entities.
Both Watchman and Spook are great (I use them both) but they actually inform you when something is wrong with your code (ie you have an entity in your code that does not exist), not necessarily that an integration did not connect or has gone offline.
You can use the following sensor to monitor your entities in real time to monitor for entities with a state of unknown and unavailable.
A template sensor like this on can also be created to monitor a specific integration.
template:
- trigger:
- trigger: homeassistant
event: start
- trigger: event
event_type: event_template_reloaded
- trigger: time_pattern
minutes: "/1"
binary_sensor:
- name: "Shelly Integration Connected"
unique_id: shelly_integration_connected
device_class: connectivity
state: "{{ integration_entities('shelly') | select('has_value') | list | count > 0 }}"
If Watchman and Spook don’t complain, you aren’t actually doing anything with its entities? Besides, the alert needs to be optional for me. I have integrations such as unplugged Shellies, remotes for TV’s taht are in power save or my Christmas tree lights that are in this state normally for the most part.