Set_state & numeric value

Hello,

is there a way to call set_state in my AppDaeomon Application and tell HASS to interpret it as numeric value (incl. History Graph)?

self.set_state(self.sensor, state = average, attributes = {"Number": count, "Max": max, "Min": min, "friendly_name":"∅ Temp."})

Currently average is a float value in AppDaemon, but not displayed as such in HASS.

Thanks for letting me know what I’m doing wrong!
Sebastian

Hi Sebastian, I’m not sure about this, but have you tried setting a device class?
self.set_state(self.sensor, state = average, attributes = {"Number": count, "Max": max, "Min": min, "friendly_name":"∅ Temp.", "device_class":"temperature"})

I could imagine that this would work.

For the UI you can set the unit as well: "unit_of_measurement":"°C" or "unit_of_measurement":"°F"

Hi Tobi,

awesome. That did the trick!

Thanks a lot,
Sebastian