I have an application running outside of homeassistant (actually just a collection of Python/pandas scripts) that takes data from the HA history database, calculates some statistics from it, and posts it back to HA using the HTTP API. I post to sensors that don’t exist, and as expected they spring into existence the first time and stick around until HA is restarted. That’s all OK, except that some of this data is only posted into HA daily, and having the sensors disappear after a reboot makes the dashboards look odd until the next post.
I’m probably missing something obvious, or just not understanding something basic, but how would I create these sensors so that they don’t disappear. I was assuming I could create them in configuration.yml (or in one of its included files) but I can’t figure out how.
I’m posting data of various types for various purposes, sometimes just state values and sometimes state + attributes.
As an example. I’m looking at the on/off state of my smart thermostat to calculate the daily runtime of my heating. (Aside, if there’s a way to do that using the built-in statistics capabilities, that would be easier, but I can’t figure that out, either:-) So I’m posting back a time interval.
What am I missing?