@ttaidapos wrote:
Ok this one is bugging me for a while and can’t troubleshoot the sucker. I have a bunch of statistics sensors and they’re all calculating perfectly fine, any feedback on what i’m doing wrong will be greatly appreciated!
Environment
Rpi4, Raspbian, 107.5Issue
I’m interested in the “change” attribute in the stats sensor only, it’s not calculating correctly no matter what sampling size i’m using, as you can see below i’m using 20k, originally set at 3600. The simple arithmetic doesn’t make sense. All other stat sensors are calculating correctly. Mind you this is only for deaths not calculating the change correctly, the confirmed change value is correct.Sensor Source:
Corona-virus integration from UIGreece Coronavirus deaths sensor.greece_coronavirus_deaths Greece Coronavirus confirmed sensor.greece_coronavirus_confirmed
Statistics Sensor
- platform: statistics name: cov19_gr_confirmed entity_id: sensor.greece_coronavirus_confirmed sampling_size: 20000 max_age: days: 1 - platform: statistics name: cov19_gr_deaths entity_id: sensor.greece_coronavirus_deaths sampling_size: 20000 max_age: days: 1
Actual data
Example problem
Summary
The confirmed shows a change of 20 which is correct. For deaths I’m seeing 5 but the answer should be 8. Seems that I’m always off by 3!
Posts: 4
Participants: 2