Hello,
I’ve a boiler with “domestic hot water” sensor that exposes different attribute, such as:
current_temperature: show the current temperature
operation_mode: set to off or auto (show me if the boiler provider or not the hot water)
min_temperature: the minimal temperature setting
max_temperature: the maximum temperature setting
as so on…
I would create a gauge card related the current temperature for this sensor, but if I insert it into a card of type gauge, the UI show me an error related the impossibility to convert the sensor into numeric value.
This, because I cannot select the attribute related the sensor.
My idea is to create a gauge card with “current_temperature” attribute as the value, and the min and max temperature as the threshold.
In this case, I can select as a min and max value as an attribute of the entity? If not, it’s possible to develop also this part?
Meanwhile, I’m now forced, to create a entity type card, selecting the sensor with the attribute set on current_temperature. But this is only an entity type card.
+1. I am surprised this feature request didn’t get lots of attention and so far was not implemented (as of Nov 2022). Would be really nice to use state attributes in gauge cards.
For example, for different weather states (temperature, humidity, wind, etc.)
Entity:
weather.home_assistant_hourly State:
sunny State attributes:
temperature: 72
temperature_unit: °F
humidity: 44
pressure: 30.27
pressure_unit: inHg
wind_bearing: 325.6
wind_speed: 6.96
wind_speed_unit: mph
visibility_unit: mi
precipitation_unit: in
As a workaround, I had to create new sensors from state attributes using platform template and then use them in gauge card, which is not ideal but works.
I agree, in general, it seems like anyplace you can use an entity value you ought to be able to use an attribute value. So yes, it would be great to have gauges support attributes.
Creating individual entities for each attribute works, but it sort of defeats one of the niceties of having all the data for a given sensor wrapped up in one nice package. Now I have to create and manage “fake” entities for each attribute, which is one more level of indirection to deal with.