Open raoulbhatia opened 8 months ago
While clicking through the homeassistant UI, trying to add cost to my Electricity grid Energy Dashboard, 2 more WARNINGs appeared:
2023-10-29 19:12:10.552 WARNING (MainThread) [custom_components.wnsm.statistics_sensor] Data starting at 2023-10-28 23:00:00+00:00 does not contain granular data! Opt-in was not set back then.
2023-10-29 19:12:11.323 WARNING (MainThread) [custom_components.wnsm.statistics_sensor] Data starting at 2023-10-29 23:00:00+00:00 does not contain granular data! Opt-in was not set back then.
There seem to be some hard-coded references to "15 minutes" in the code – perhaps this interferes with the daily reporting that is the default for Smart Meters in Austria? See https://github.com/DarwinsBuddy/WienerNetzeSmartmeter/blob/main/custom_components/wnsm/statistics_sensor.py#L156-L162 as of 2023-10-29
Yes, this was intentional, as I had no idea how daily data would look like. Now we know :) And the other thing is, that AFAIR daily data cannot really be imported into the statistics, but only hourly data. One cheap trick would be to divide the value by 24 and import all of them...
Personally, I'd be OK a h that ie better to have some data with caveats compared to no data.
Though I am confused as to why import of historic data would be any different to daily data that is newly ingested.
Perhaps this should be made a configurable option? ie also the daily data could be the imported as /24 to get hourly data?
If dixumentrd well, this might be less confusing for the user?
After #193 was fixed (
QUARTER_HOUR
vs.DAY
granularity), I am one step further in importing historical data.Judging from the logs,
wnsm
is able to properly fetch the historical data, but then fails to import it with the following warnings:Note: The integration was enabled 2023-10-09. The first data appeared 2023-10-10 10.00h CEST.
My current observations:
Cheers, Raoul
Appendix A Missing Historical Data
Appendix B Different Import Times