I have a Meross integration which started acting up recently and devices keep going offline (even though it says they are connected in the logs) while I have raised the issue with the owner, I need a way to fix their availability with some automation
It looks like this when they stop responding:
I created an automation like so but it never triggers:
- id: '1627152370529'
alias: Meross is unavailable
description: ''
trigger:
- platform: state
entity_id: switch.recliners
to: Unavailable
for: 0:05:00
condition: []
action:
- service: notify.mobile_app_sm_g998b
data:
message: Meross is unavailable for more than 5 mins
mode: single
Any ideas why it is not triggering, I’m thinking the trigger logic but it looks good to me
Another alternative if you have a lot of entities that needed attention in case they are unavailable-
It will create an entity called sensor.unavailable_entities that updates once every 60 seconds.You’ll also have the option to set an automation to notify you if some devices became unavailable.
It’s done via the UI (Integrations > The integration > Overflow menu > Reload). Currently, there’s no service call to do that (you can check that by examining the list of available service calls in Developer Tools > Services).
It appears that its ability to reload an integration was an afterthought because the user is required to supply an identifier that isn’t readily available unless they explore the hidden registry files.
Even Updating Add-Ons don’t require hard-to-find identifiers:
Nevertheless, I appreciate you posting that and the only thing left unsaid is explaining to the OP where to find the integration’s identifier.
FWIW, there’s a PR in the works to provide new templating functions to access registry data. Whenever it becomes available, it may offer a means of acquiring the entry_id using the integration’s name (assuming it’s unique).