see Lovelace: Bar Card - #899 by Mariusthvdb and the dedicated post I did on it in the link below it)
Right, I found that one yesterday and installed it, I now have these _battery_type entities too ![]()
use device_class: battery?
Yes it does? you just need to specify a separate dash
filter:
include:
- device_class: battery
- entity_id: *_battery_level
- entity_id: '*_some_battery*'
you could also add a label: battery to those entities, and then select the label (but beware, in my setup that really hits hard on the system aka kills it, so I only use those with auto-entities in a template using {{label_entities('battery')}} )
and, not sure about Bard-card templates (never used it) but you can c&p any complete yaml block in an anchor.
edit
I read on, and now see that you list that as Yaml template at the bottom of your post… yep thats it.
but I think you don’t need that in the end, if you setup your filters alright
also, I am experimenting with the template-entity-row card and am almost ready, but the state doesnt colorize as I want it, so Ill first post that effort in card-mod, but the main body will be:
- type: entities
entities:
- type: custom:template-entity-row
entity: sensor.studenten_hygro_temp_battery
state: >
{{states(config.entity,with_unit=True)}}
secondary: >
Battery type: {{states(config.entity ~'_type')}}
and then feed that to auto-entities
edit
fixed it…
I had a typo there.
