Standardize times in time sensors Jewish calendar#26940
Conversation
|
Nice idea. We make "early shabbat" during DST (well, mostly; we stopped a few weeks ago), so I created my own issur_melacha sensor based on plag hamincha on Friday, and the conversion to compare the current time with plag as a timestamp was a bit of an exercise in Jinja and figuring out what's what. This will make that sort of thing much easier :-) |
|
I'm closing this pull request for now. I'm trying to envision what I would like ultimately to be possible and I think it will need some other PR's first. Ultimately, I would like to reach a point where I could write the following automation: @balloob would you consider such a PR? Or am I in the wrong direction, I suppose this would mean opening up an architecture issue? |
|
Yeah I would consider such a PR . It might be better to just have time trigger be aware of timestamp device classes sensors. That way the UI could offer a dropdown. |
Timestamp device class requires ISO 8601 format
This reverts commit 8a2fda3.
As this is part of the UI decision, it should be decided by lovelace. A nice addition for a future PR, might be the option to hint to lovelace the preferred way to display some data.
Although I don't understand it, I give up :)
I don't really see the value in these attributes, if there are any they should be implemented in the sensor component for the timestamp device class
|
Thanks! |
Breaking Change:
The output of the timestamp sensors have been streamlined so they're easier to use in automations. All the timestamp sensors will return UTC time in ISO 8601 format.
Attributes have been added to get a UNIX timestamp.
Please note if you have any automations relying on the timestamp, you'll need to update them to compare to the UTC timestamp.
Description:
This standardizes the times in the timestamp sensors for the Jewish calendar, times like candle lighting, havdalah etc. are all defined as timestamp sensors. As such, their state will show ISO8601 UTC timestamps.
Also, timestamp attributes have been added to the sensor. This should allow easier automation triggers and conditions when comparing timestamps.
Related issue (if applicable): fixes #
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10463
Checklist:
tox. Your PR cannot be merged unless tests pass