core
core copied to clipboard
twentemilieu integration could return dates in the past in their provided sensors
The problem
It looks like the integration is using the first day of the date array provided by the Twente Milieu API. Twente Milieu does not immediately update this array once we are passed this (first) date. The sensor will therefore present a day in the past until Twente Milieu removes the first entry from the array.
This can be solved if the integration skips dates in the past and shows the next date in the array. In the example below the sensor should present 2022-10-03 instead of 2022-09-19 (today is 2022-09-20).
"1": [
"2022-09-19",
"2022-10-03",
"2022-10-17",
"2022-10-31",
"2022-11-14",
"2022-11-28",
"2022-12-12",
"2022-12-24"
]
I suggest using the current date based on CET European time because these dates are only relevant in this specific time zone.
What version of Home Assistant Core has the issue?
2022.9.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
twentemilieu
Link to integration documentation on our website
https://www.home-assistant.io/integrations/twentemilieu/
Diagnostics information
config_entry-twentemilieu-65f5c40827d74f8193708b58868d74a9.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
twentemilieu documentation twentemilieu source (message by IssueLinks)
Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (twentemilieu
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Until then my dashboard will show 'onbekend'. Not ideal :)
It took one day for Twente Milieu to update, so everything is fine now. If it is only one day, then I don't think it is worth the trouble to make a fix for this.