Open conorlap opened 2 years ago
This could be accomplished with a template card, if you're in a rush 😄 On the other hand, I honestly thought HA handled the icon state (capacity & charging status)?
You're right that HA handles the icon state for capacity, but I don't believe it handles for charging.
custom:battery-state-entity card handles it like this:
- type: custom:battery-state-entity
tap_action: more-info
entity: sensor.huawei_watch_battery_level
name: Conor's Watch
charging_state:
state: 'on'
icon: mdi:battery-charging-outline
color: yellow
entity_id: binary_sensor.huawei_watch_is_charging
where it needs the additional binary sensor 'is_charging'
The icon is already handled by the mushroom-entity-card
. Only the color is missing.
+1 I would love to change the colour icon option for the entity-card based on state or values, I use card_mod for stock cards eg -
I use the template card for that personally. But it's quite some work like that. An battery entity card would be really nice. :-)
I agree. Because the purpose of Mushroom is letting users add its cards through the UI easily, I think a battery card would be nice. Yeah, It's possible to do it through the template card but it's a little bit of work to write the templates for icon and color changes. +1 for battery card :D
Me too +1 :D
This could be accomplished with a smart version of the gauge card for mushroom for instance.
This could be the design:
But add options for setting the color based on SOC levels (% levels or similar). This could be very versatile just like the gauge card.
Describe the solution you'd like It would be great to have the ability to set colour thresholds for battery levels in the entity-card, so that the battery icon can change colour depending on current battery level (eg red / orange / green) - and ability to change the icon for various states too (if device is charging for example)
Additional context
The custom:battery-state-entity card allows you to set colour thresholds and change the icon when the device is charging: