Open bramstroker opened 3 years ago
This state information can be added to displayed state via an "additional state" option which will prompt for either a template or choose multiple entries from the entity's attributes.
@mouth4war would be nice to have some option for additional state. To have some more generic approach and not only for power consumption. however in this issue the power sensor is a different entity than the card entity, so your proposed solution won't work in this case.
Could be something like this maybe in the configuration. additional_state
config option with the following possibilities:
entity
-> Optional, when not passed the same entity as the card will be assumed
state_attribute
-> Required, attribute of the entity, or state
when you want the state
template
-> Optional
So for the power sensor the configuration can be:
{
"additional_state": {
"entity": "my_power_sensor",
"state_attribute": "state"
}
}
Or for you humidity example:
{
"additional_state": {
"state_attribute": "humidity"
}
}
Not sure about the feasibility of this approach. @mattieha, what do you think?
Also issue #84 could be intregrated somehow in this generic implementation
Good idea. Just need multiple addition attributes lines.
I love this card, awesome job! Replaced all my light controls with this one.
Have one feature request, maybe you could consider implementing. I have power sensors of all my lights and other appliances. It would be nice to display the current consumption (Watt) in the slider-button-card. Introducing two options to control this:
power_entity
and maybedisplay_power
.