Two questions below - and thank you all for your help!
I have a huge number of sensors now in my home, and once every could of days I need to rejigger one or another thing to bring them back online or back to a properly functioning state.I would like to create a dashboard that shows a concise list (only out of a set of devices I wish to monitor, they are from different vendors) - of all those which are currently “unknown” or “unavailable”. This would be very handy to then be able to just at a glance know if anything needs attention. So here are my two questions -
As an exmple I do have for instance a sensor that shows (self explanatory):
#
# This binary sensor not only specifies if any entities in the integration are unavailable, but also if
# there are any unavailable, it will contain an attribute that is a list of the entities that are unavailable.
#
template:
- binary_sensor:
- name: "Any Shelly Unavailable"
state: "{{ integration_entities('shelly') | select('is_state', 'unavailable') | list | count > 0 }}"
attributes:
entity_id: "{{ integration_entities('shelly') | select('is_state', 'unavailable') | list }}"
unique_id: any_shelly_unavailable
- Can someone provide a sample or a template sensor or the like that I could use to figure out how to create, in one or more or a combination of (template?) sensors that would have a list of the devices and next to each, either the word unavailable or unkown and the time that it became that state?
- If it was done in the same manner as the above example, then how would I display attributes in a dashboard (if that is what would be needed)?
I don’t care if it is a lot of coding or if I have to type out the name of every saingle sensor in the code, once it is done then I am golden (it doesn’t need to be any kind of automatically generated list, because some I do not want to show that I would expect to be offline at certain times, etc.)…
I could create a dashboard with a gazillion cards and each card would represent a sensor and only be displayed if that sensor state is unknown or unavailable, but not only would it be ugly instead of a compact list, but I am sure there must be a more elegant way of handling this…
Thank you anyone who could help get me started or pointed in the right direction!
Use the Auto Entities card in HACS. You can filter entities by name and status and have all matching ones appear as a list in one card.
E.g. show all my battery devices with less than 40% battery
type: custom:auto-entities
card:
type: entities
state_color: true
filter:
include:
- name: /Batter/
domain: sensor
exclude:
- name: /Weatherflow/
- name: /[vV]oltage/
- name: /[Pp]ower/
- name: /[sS]tate/
- name: /[Tt]emp/
- name: /[Hh]ealth/
- name: /SM-T510/
- state: "> 40"
- state: unknown
sort:
method: state
reverse: false
count: 5
show_empty: false
1 Like
Thank you I finally got what I needed, I ended up using this convoluted yaml but it works like a charm:
type: custom:auto-entities
card:
type: entities
title: Availability Audit
show_header_toggle: false
filter:
include:
- state: unknown
- state: unavailable
exclude:
- name: /Reboot/
- name: /device_tracker/
- name: /kruse_s_s23/
- name: /[fF]ile editor/
- name: /holding until/
- name: /firmware/
- name: /Identify/
- name: /Clear hold/
- name: /Clear Hold/
- name: /Cloud/
- name: /Reload/
- name: /Restart/
- name: /Room/
- name: /Kruse/
- name: /Away Mode/
- name: /Ludington Ridgewood/
- name: /hold duration/
- name: /Ding Dong/
- name: /Last Ding/
- name: /Pressed/
- name: /BasementWaterMeter/
- entity_id: "button.front_door_ring_doorbell_take_snapshot"
- entity_id: "device_tracker.comm_mlap_018_2"
- entity_id: "device_tracker.mac_2"
- entity_id: "binary_sensor.den_archer_ax10_in_wap_mode_wan_status"
- entity_id: "select.dining_room_ecobee_thermostat_current_mode"
- entity_id: "climate.den_room"
- entity_id: "climate.dining_room_room"
- entity_id: "sensor.basement_right_railing_esp8266_ws2812b_estimated_current"
- entity_id: "sensor.basement_left_railing_esp8266_ws2812b_estimated_current"
- entity_id: "device_tracker.abbvie_notebook_wifi"
- entity_id: "sensor.airnow_pm10"
- entity_id: "sensor.basement_gas_meter_fwversion"
- entity_id: "sensor.basement_gas_meter_hostname"
- entity_id: "sensor.basement_gas_meter_interval"
- entity_id: "sensor.basement_gas_meter_ip"
- entity_id: "sensor.basement_gas_meter_mac"
- entity_id: "sensor.basementwatermeter_fwversion"
- entity_id: "sensor.basementwatermeter_hostame"
- entity_id: "sensor.basementwatermeter_interval"
- entity_id: "sensor.basementwatermeter_ip"
- entity_id: "sensor.basementwatermeter_mac"
- entity_id: "select.basement_left_railing_esp8266_ws2812b_playlist"
- entity_id: "select.basement_left_railing_esp8266_ws2812b_preset"
- entity_id: "button.basement_left_railing_esp8266_ws2812b_restart"
- entity_id: "select.basement_right_railing_esp8266_ws2812b_playlist"
- entity_id: "select.basement_right_railing_esp8266_ws2812b_preset"
- entity_id: "button.basement_right_railing_esp8266_ws2812b_restart"
- entity_id: "select.bedroom_1_activity_status"
- entity_id: "select.bedroom_2_activity_status"
- entity_id: "select.bedroom_3_activity_status"
- entity_id: "select.den_activity_status"
- entity_id: "climate.bedroom_1_room"
- entity_id: "climate.bedroom_2_room"
- entity_id: "climate.bedroom_3_room"
- entity_id: "button.master_controller_start_wlan_optimization"
- entity_id: "button.ignore_all_issues"
- entity_id: "button.unignore_all_issues"
- entity_id: "sensor.basement_right_railing_esp8266_ws2812b_max_current"
- entity_id: "sensor.basement_left_railing_esp8266_ws2812b_max_current"
sort:
method: name
reverse: false
One other quick question - what setting do I enter into the ‘visibility’ tab to generally just hide the card if the list has 0 items?
That’s the “show empty: false” value that hides the card if there are no matching entities.
1 Like
Yes I noticed that and toolk advantage of it and it works like a charm