1

I have a calculated result from a Python/AppDaemon script running on Home Assistant. I want to display that calculated result on my HA/LoveLace dashboard, so I created a sensor from AppDaemon. Unfortunately, I don't seem to be able select what variable type I want my state to be. Clearly HA distinguises between float, string, or bool internally. When you go to history some sensors are displayed as plots, and others as bar charts. Everything I create---even numeric data---shows up as a string. How do I set the variable type of my own sensors?

I am using this line in AppDaemon to (1) create, and (2) update my sensor.

self.set_state('sensor.my_sensor_value', result)

0 Answers0