I’m hoping there is a simple solution to this since that I am missing.
I have 36 UPS units that are being monitored using the NUT Integration.
each one has an entity(sensor.ups_name.status) that reports either “Online” or “unknown” if the UPS is down.
The auto-entities card allows me to filter the entities correctly.
If I filter by “Online” I can display all the “online” entities in an entity card.
However, if I filter by “unknown” and all UPS units are online I don’t seem to have the option to display a default message in that card such as “All UPS units are operating normally”, I can only choose to not show the card in my dashboard at all or show what at this point is an empty card…
If anyone has any ideas on how to accomplish this I would appreciate it.
Ok, so here is what I came up with to make what I wanted work.
ttype: custom:stack-in-card
title: 'UPS Units Status:'
mode: vertical
cards:
- type: conditional
conditions:
- entity: sensor.n1_1_status
state: Online
- entity: sensor.n2_1_status
state: Online
- entity: sensor.n2_2_status
state: Online
- entity: sensor.n3_2_status
state: Online
- entity: sensor.n3_1_status
state: Online
- entity: sensor.n4_1_status
state: Online
- entity: sensor.n4_2_status
state: Online
- entity: sensor.b4_2_status
state: Online
- entity: sensor.b4_1_status
state: Online
- entity: sensor.b3_2_status
state: Online
- entity: sensor.b3_1_status
state: Online
- entity: sensor.b2_2_status
state: Online
- entity: sensor.b2_1_status
state: Online
- entity: sensor.b1_2_status
state: Online
- entity: sensor.gp_2_status
state: Online
- entity: sensor.gp_1_status
state: Online
- entity: sensor.m1_2_status
state: Online
- entity: sensor.m1_1_status
state: Online
- entity: sensor.t1_2_status
state: Online
- entity: sensor.t1_1_status
state: Online
- entity: sensor.m4_2_status
state: Online
- entity: sensor.m4_1_status
state: Online
- entity: sensor.m3_2_status
state: Online
- entity: sensor.m3_1_status
state: Online
- entity: sensor.m2_2_status
state: Online
- entity: sensor.m2_1_status
state: Online
- entity: sensor.t4_2_status
state: Online
- entity: sensor.t4_1_status
state: Online
- entity: sensor.t3_2_status
state: Online
- entity: sensor.t3_1_status
state: Online
- entity: sensor.t2_2_status
state: Online
- entity: sensor.t2_1_status
state: Online
card:
type: markdown
content: |
All UPS Units Are Currently Online!
- type: custom:auto-entities
card:
type: entities
filter:
include:
- name: /Status$/
state: unavailable
integration: nut
show_empty: false
It sure seems like I should be able to use the auto-entities card to do what I am successfully doing with the conditional card only a lot more efficiently with less repetition and less code in general.
Could anyone offer a suggestion as to hao I might accomplish that?
Did you ever come up with a solution that does not require manually putting in all the entities? I’m making a dashboard to make sure it is “safe” to go to bed and it sure would be nice to have it show a positive message that nothing matched the filter rather than just blank or the title.