Unavailable entity detection & notification

@ian.robson, check if you have the right home assistance URL on the page that opens when you click Import Blueprint. The URL address is located at the bottom of the windows and you can edit by clicking the pencil icon at the right.

Alternatively use this URL to import it: https://github.com/gmlupatelli/blueprints_repo/blob/cab231edbd05820c070de5c6a38f140868cbbbcb/unavailable_entities_notification/unavailable_entities_notification.yams

1 Like

Thank you that fixed it.

Very nice blueprint! @gmlupatelli

I have this problem:

Everything works perfect but the telegram notification does not start. If I simply delete the word {{entities}} the notification is sent (obviously without the entity names)
Any idea on the possible solution?

Just remove the '' from entities.

Here is an example of a working message:

message: 'Here is a list of unavailable entities in your home: {{entities}}'

Unfortunately, the problem is not there.
Here is the image with the new message (I deleted every word I added before).

The blueprint works perfectly since the results (above in the image) are what I expected, but the telegram notification doesn’t start. The notification starts if I delete the word {{entities}} so the problem is not in the notifiy service either. What should I check for?

Thank you

I think I got it :slight_smile:

After doing some research at the forum I found someone with a problem with the telegram bot similar to the one you are having, and it was related to the fact that the variables in the message had underscore, here is the link to it: Telegram message with variables - #2 by anon43302295

Looking at what you have inside the entities variable I see you have some sensors that have _ in the name, given that you need to replace them with something else, try this {{ entities|replace('_', ' ') }}

Thank you so much! :pray:
That was the problem! I fixed it!

Any chance you could add an include list as well as the exclude?

I’d like to track specific entities that fall offline, and I have many many entities that are ‘unavailable’ for other reasons, due to custom components considering that to be a valid state for ‘not active’ (e g Google home timers).

No worries if not, just thought it might be a nice addition of easy enough.


This is really great.

Anyone know an easy way to adapt this to include and not exclude entries? or change it from daily to hours etc…

1 Like

If you know how to edit the blueprint:
In the unavailable_entities_notification.yaml file edit the following:

Line 91:
{% if state.state == ‘unavailable’ and not state.entity_id in exclude.entity_id %}
{% if state.state == ‘unavailable’ and state.entity_id in exclude.entity_id %}

You can also replace every word “Exclude” (or “exclude…”) with the word “Include” for less confusion :sweat_smile:.
The Blueprint now works only with every Included entity!

1 Like

Is there any way to avoid triggering the automation when there’s no unavailable entity? I’ve tested with unavailable ones and work like a charm, a persistent notification is sent. But when all entities are available the notificaiton got triggered as well.

I have integrated the battery blueprint and works like a charm, not triggered when threshold is not under.

Thanks in advance

I’ve found the issue: It was introduced with latest commit. I just copied the previous version were entities were shown using commas instead of /n. Hope it helps.

@marc.forn, just figure out as I also have a low battery automation that uses the same code base. Sorry about that. Just committed a fix to both.

I don’t find the verbose entity names useful, so I forked this Blueprint so that it spits out entity_ids instead: https://raw.githubusercontent.com/mmichon/blueprints_repo/master/unavailable_entities_notification/unavailable_entities_notification.yaml

1 Like

Thanks for the update. We are all here for the community :wink:

@gmlupatelli ciao. can you add an option to run the check every X minutes instead of once per day?

1 Like

@gmlupatelli I implemented expanding devices - see pull request at GitHub :slight_smile:

1 Like

Merged. Thanks for adding the feature.

Been using this for a while and it’s very helpful, thank you!

I have this in an auto entities dropdown in an admin dashboard, but is there a way to just show devices which have any unavailable entities instead of the entities themselves? Some of these devices have like 10 entities and I don’t need to see them individually because when they go offline it’s always all of them.