I would like to see each what I’m calling a reading. What I mean can be seen in the image below, which is the same history graph captured with my pointer hovering over different places along the graph which, I believe, are different data points or readings of sensor values.
It doesn’t need to be in graph format. Table would be fine.
I am trying to figure out how and why there are data points at these (to me) random times.
This is the configuration.yaml code that creates this sensor:
command_line:
- sensor:
command: "curl -k -u <user>:<password> https://ws.otodatanetwork.com/neevoapp/v1/DataService.svc/GetAllDisplayPropaneDevices --header Content-Type:application/json"
name: "Propane Tank Neevo 371 Gallons"
unique_id: propane_tank_371_gallons
value_template: "{{ value_json[0].Level|float(0) * 2.4 if value_json[0].Level is defined else this.state }}"
scan_interval: 14400
state_class: measurement
unit_of_measurement: "Gallons"
# 371 Propane
I don’t understand how the sensor value could change more frequently than every 14400 seconds (4 hours). I really only need daily readings, so the only reason I have the scan interval set to every 4 hours is just in case setting it to every 24 hours results in a single failure to read and then missing a day.
It looks like the sensor value is determined to have “changed” upon reloading of YAML or restarting of HA also.
Yes, that’s expected behaviour. The scan_interval restarts in that situation. None of your timestamps from the graph above are closer than 14,400s apart: shortest interval is 15,149s.
How often are you restarting / reloading? What happens if you don’t do that?
I thought I would explore the SQL integration as a possible to way to explore the mysql db that I’m using for HA. Didn’t get very far.
Then I thought: Shouldn’t there be a log, or a way to enable logging, for when any particular sensor is updated or has a change of value.
I see that the DEVELOPER | STATE values show LAST UPDATED and LAST CHANGED.
There should be a way to record this, to keep track of all the occurences for a sensor of UPDATED and CHANGED and the associated values (for later display).