Open dieugab opened 2 years ago
Additional info, straight from Home Assistant docs: https://www.home-assistant.io/docs/configuration/templating/
This integration currently seems to omit the “T”. Can that be added, to be compliant with HA standards?
What is your sensor config? Do you use the option to make the sensor state a date object?
@pippyn I believe I have it setup as a date object. Should it be something else? Below is the config:
- platform: afvalbeheer
upcomingsensor: 1
wastecollector: HVC
resources:
- gft
- papier
- pmd
postcode: XXXXAA
streetnumber: XX
dateobject: 1
Do you need the date object? If not remove that option and all should be fine
I'd rather it be a dateobject as that way I can show relative time like in the screenshots in my first post ("next week, next month"). Otherwise it's just a string of numbers.
I'd be fine to use a custom dateformat. I've tried '%F' and '%Y-%m-%dT%H:%M:%S%z' but both seem to still omit the "T"
I am working on make the timestamps ISO compliant, but it is not ready yet.
The problem is not all API's report the timezone, so I'll have to convert them and do a lot of tests.
For now you'll have to sit tight i'm afraid.
No problem! I’m glad this integration exists at all, happy to wait. I’ll see if I can figure out making a template sensor for each that’s ISO compliant.
I have 3 sensors setup with this integration. However, on the iOS apps and mobile safari they display as “invalid timestamp”, while they display correctly on desktop browsers.
Proper display on desktop:
Incorrect display on mobile:
I first reported this as a Home Assistant frontend issue here: https://github.com/home-assistant/frontend/issues/11351 but apparently it’s an ISO 8601 timestamp issue and up to the integration author to fix, according to this comment: