Core: Jewish Calendar - Times is broken

Created on 26 Nov 2018  ยท  23Comments  ยท  Source: home-assistant/core

Home Assistant release with the issue:
0.82.1

Last working Home Assistant release (if known):
Never

Operating environment (Hass.io/Docker/Windows/etc.):
Docker

Component/platform:
jewish_calendar - https://www.home-assistant.io/components/sensor.jewish_calendar/

Description of problem:
mga_end_shma & first_stars don't work at all. Times don't change, and they're completely wrong for the timezone (NY-EST).

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

  - platform: jewish_calendar
    language: english
    diaspora: True
    latitude: 41.0887620
    longitude: -74.0737290
    sensors:
      - date
      - weekly_portion
      - holiday_name
      - mga_end_shma  
      - first_stars

Traceback (if applicable):


Additional information:
image_79

jewish_calendar

Most helpful comment

FYI the goal is to ultimately have a suite of "upcoming shabbat/yom tov" sensors for jewish_calendar. I actually have this working quite nicely with a Hebcal integration right now and have some great pre-Shabbat/Yomtov automations, but as @tsvi pointed out, local calculations are better -- I actually just found that to be the case with Shabbat Chanukah, where the Hebcal API spits out an illogical response for havdalah then. So the jewish_calendar sensor will use next_day to detect if it's erev Shabbat/Yomtov.

Beyond that, hopefully we can expose more functionality to HA.

All 23 comments

@tsvi not sure if you're getting notifications..

Thanks @tes5884

I'll check what happened

Could you post the following part of your config:

homeassistant:
  latitude:
  longitude:
  time_zone:

That's where the component gets its time zone from.

But I think I should add an option to set the timezone for the sensor manually as I'm planning to add in the future the possibility to set multiple sensors.

homeassistant:
  latitude: 41.0887620
  longitude: -74.0737290
  time_zone: America/New_York

I'm having the same issue. Tried with and without specifying the longitude/latitude, the result is the same.

Ok, i tried your config and it works for me ๐Ÿ˜ž.

So this probably because your hardware clock is synchronized to local time and not UTC.
I'll go on a hunch and say your not using hassio, rather a Linux dual-booting with Windows.

Could you specify the platform you're using, that way we can do some more checks to find the culprit?

I'm using Docker on a fully Linux host. With /etc/localtime mapped to the
host.

Maybe I'll remove that mapping..

On Thu, Nov 29, 2018, 02:03 Tsvi Mostovicz <[email protected] wrote:

Ok, i tried your config and it works for me ๐Ÿ˜ž.

So this probably because your hardware clock is synchronized to local time
and not UTC.
I'll go on a hunch and say your not using hassio, rather a Linux
dual-booting with Windows.

Could you specify the platform you're using, that way we can do some more
checks to find the culprit?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/18731#issuecomment-442727816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AByqchU_L1IC8XQX2Z7pDZ5zjxkUprSvks5uz4axgaJpZM4Yz32Z
.

Please try adding the time date component. That way we can see what time home assistant is thinking it is.
https://www.home-assistant.io/components/sensor.time_date/

Like @tes5884, I'm using Docker on a fully Linux host with the same /etc/localtime mapping. I already have the time_date component and it does show the correct time.

sensor.time shows the correct local time, and sensor.time_utc gives the correct UTC time...

I'm not sure if it's the same issue, but I never see holyness updates. It's been on 0 for the last 24 hours, which, no matter what the timezone or location is, is not reasonable ;-)
[let me know if you'd rather this be a separate issue, and what other info to provide (I'm on 0.83.1)]

Any updates? Or anything else I can provide?

On Sat, Dec 1, 2018, 11:20 Mike Miller <[email protected] wrote:

I'm not sure if it's the same issue, but I never see holyness updates.
It's been on 0 for the last 24 hours, which, no matter what the timezone or
location is, is not reasonable ;-)
[let me know if you'd rather this be a separate issue, and what other info
to provide (I'm on 0.83.1)]

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/18731#issuecomment-443437656,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AByqciNeQnNDEzEq1Kj5rHWMQC3aYWSSks5u0qw9gaJpZM4Yz32Z
.

I do see Chanuka appearing, but there was nothing last Shabbat/os. I was expecting to see that as well... though now that I'm reading the docs a bit more carefully, I realize this may only be chagim. Did I misunderstand? [also, regarding chagim, is there any indication of erev chag? I'm looking for a way to automate something X minutes before candlelighting, for example...]

@mikeage you can open a new issue for this. You're correct that at the moment it doesn't show shabatot. @arigilder is helping me improve the hdate library. His latest pull request should allow us to provide such functionality. I suppose it will be merged into home assistant somewhere in the coming weeks bli neder.

@tes5884 I haven't found the time to replicate your installation. Could you try and map /etc/timezone as well? Google tells me this might solve the issue.

The HA guidelines suggest that github issues are only for bugs, not feature requests, so I'm not going to open anything here, especially since I've gotten to mention it via an unrelated issue ;-)

In any case, thanks, and sorry for wasting your time with my misunderstanding of what the library provides :-)

@mikeage feel free to open up issues on royi1000/py-libhdate for feature requests pertaining home assistant. I'll add a label for home assistant specific issues

Thanks. It looks like https://github.com/royi1000/py-libhdate/pull/33 should provide everything, though (with the next_day() function)

FYI the goal is to ultimately have a suite of "upcoming shabbat/yom tov" sensors for jewish_calendar. I actually have this working quite nicely with a Hebcal integration right now and have some great pre-Shabbat/Yomtov automations, but as @tsvi pointed out, local calculations are better -- I actually just found that to be the case with Shabbat Chanukah, where the Hebcal API spits out an illogical response for havdalah then. So the jewish_calendar sensor will use next_day to detect if it's erev Shabbat/Yomtov.

Beyond that, hopefully we can expose more functionality to HA.

@tes5884 I haven't found the time to replicate your installation. Could you try and map /etc/timezone as well? Google tells me this might solve the issue.

No luck...

Any update on this?

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment ๐Ÿ‘
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I suppose this is still an issue as I haven't looked into it yet.

Hi
Have same problem
The : sensor.jewish_calendar_upcoming_candle_lighting show - 2:00:00 from original time

Have solutions?

Was this page helpful?
0 / 5 - 0 ratings