In older HA versions, it was possible to get all ZHA devices with
{{ states.zha|list }}
but it seems that the zha.* entities have been dropped in new HA versions.
Is there any other way to get the list of ZHA devices?
In older HA versions, it was possible to get all ZHA devices with
{{ states.zha|list }}
but it seems that the zha.* entities have been dropped in new HA versions.
Is there any other way to get the list of ZHA devices?
This is great question. I would like to know that as well.
No answer yet. I think it is not possible to get the list of devices any more, you can only get a list of entities with {{ states|list }}
What is the use case for this? There are web socket commands that return this…
Hi David, one usecase: an automation which regularly checks the battery state of zigbee devices. Another usecase: a reporting script generating a maintenance list of the zigbee devices.
Meanwhile I have 30 zigbee devices with battery, every few weeks a battery is empty and it needs a lot of time to find out why home assistant is not working like it should. without a good battery management and reporting my system is not very usable. I have been abroad for 2 months and after coming back, 3 devices did not work because the battery was empty. The house was cold because the temperature sensor did not work. If I had a chance to check the batteries every week, this would not happen.
I find this card to be a good way to stay ahead of any battery issues. Just check the card periodically for the battery levels.
This card needs a list of devices. I won’t type in a list. “states.zha” used to be exactly that list, but it stopped working.
Not if you use it in conjunction with the auto-entities card.
Here is my config:
- type: custom:auto-entities
card:
type: custom:battery-state-card
name: Battery Status
show_header_toggle: false
state_color: true
color_gradient:
- "#ff0000" # red
- "#ffff00" # yellow
- "#00ff00" # green
filter:
include:
- entity_id: 'sensor.*_battery_level'
show_empty: false
sort:
method: state
numeric: true
I never add any battery devices to any list. As long as they end in “_battery_level” (which almost everything should now unless it’s custom - but you can even change that too) they will automatically populate in the list.