[Example] Auto-Entity Battery Card with Sliders #1368
Zerosignal84
started this conversation in
Share your custom styles, templates and dashboards
Replies: 3 comments
-
I like this, thanks!
|
Beta Was this translation helpful? Give feedback.
0 replies
-
For those who want to automatically get rid of 'Battery+' part of entity name, here is template filter version: type: custom:auto-entities
card:
type: vertical-stack
card_param: cards
filter:
template: >-
{% for state in states.sensor if "battery_plus" in state.entity_id -%}
{{
{
"type": "custom:bubble-card",
"card_type": "button",
"button_type": "slider",
"entity": state.entity_id,
"name": state.attributes.friendly_name.split(' Battery')[0],
"show_last_changed": true,
"show_state": true,
"read_only_slider": true,
"scrolling_effect": false,
"sub_button": [
{
"show_state": false,
"show_icon": false,
"state_background": false,
"show_background": false,
"show_attribute": true,
"attribute": "battery_type_and_quantity"
}
],
"modules": [
"default"
]
}
}},
{%- endfor %}
sort:
method: state
numeric: true
reverse: false
show_empty: true |
Beta Was this translation helpful? Give feedback.
0 replies
-
i had some trouble so i leave my version for those that had the same problem:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With the new slider update now showing battery states as a percentage of the bar I decided to switch my old auto populated battery card over to bubble!
Cards & Integrations used:
This is what the current auto population looks like, I might play around with the styling some more or maybe event take some advice from the gurus here.
Hope somebody finds this useful!
Beta Was this translation helpful? Give feedback.
All reactions