WTH don't we have missing/unknown entities showing up in "Repairs" section

can you tell me in what case you have an unavailable entity, and don’t care about it?

Or for a dashboard display, the third party auto-entities card is great for this.

card:
  title: Unknown
  type: entities
filter:
  include:
    - domain: sensor
      state: unknown
    - domain: binary_sensor
      state: unknown
    - domain: light
      state: unknown
    - domain: switch
      state: unknown
    - domain: vacuum
      state: unknown
show_empty: false
type: custom:auto-entities

Screenshot 2022-10-01 at 02-24-52 Administration – Home Assistant

5 Likes

That would even be complex?

  • Add a trigger on a state
    • select the entities you want to be informed of (multiple can be added)
    • to state: Unavailable
    • for: 00:05:00
  • Add an action you like, e.g., notify.

There is really not more too it

device_trackers in particular come and go on your router and are no longer available. I couldn’t care less as extra entities do absolutely nothing. Also, some devices are powered by other devices and are only available when they have power.

Currently I have 80 entities that are unavailable. All which I do not care about, nor do any of them need fixing.

I guess that is my issue. i don’t see a reason why this wouldn’t be “every entity i have”
can i make this “every entity”

There’s also this:

2 Likes

this seems like a pretty good option so far, but an alert would be best.
thanks!

trigger:
- platform: event
  event: state_changed
condition:
- condition: template
  value_template: "{{ trigger.to_state.state == 'unavailable'}}"
action:
- service: notify.notify
  data:
    message: "{{ trigger.to_state.name }} is unavailable"
1 Like

i tried transcribing what you have in the template editor here, but couldnt get it to work. how do i get this template to “listen for all state changed events”?

That’s an automation, it won’t work in the template editor.

if this does what i think it does… it might be exactly what i need…

It will notify you when an entity is unavailable.

1 Like

that was a reply to your other post that was a screenshot of you in the template editor in dev tools

Ah, that template is…

count

{{ states | selectattr('state','eq','unavailable') | map(attribute='entity_id') | list | count }}

entities

{{ states | selectattr('state','eq','unavailable') | map(attribute='entity_id') | list }}
2 Likes

Won’t this trigger all the time?

@adamaze: If you like, have a look at this approach:

unavailable-entities-sensor/package_unavailable_entities.yaml at 8cb0a6ab34f58384fb5b3dbb8337b21abadf0f36 · jazzyisj/unavailable-entities-sensor · GitHub

1 Like

Yes it will, but the condition will cause it to not notify.

This looks pretty much perfect. I will definitely give it a shot! thanks!
if it works how i expect it, i will come back and mark this as the solution.

I guess my “WTH” at this point would just be “why the heck isnt this just standard?” if it is easy enough to throw in an ignore list, and some regex ignore patterns, i think this will provide a big benefit.

I’m using this for a long time and it’s working flawlessly.

thanks again. this has already helped me discover and fix a bunch of old and or broken stuff :slight_smile:

It took a little time to clean things up, but i went from a peak of ~140 unknown/unavailable. down to zero. now i just need to change the default persistent notification over to a mobile_app notification.