Jewish calendar showing wrong times

Hi.
I’m new to this great community.
I added the jewish calendar to my configuraton file, and the time it is showing for lighting candles and all the rest is wrong.
my configuration:

default_config:
homeassistant:
  name: Gedera
  latitude: 31.81456
  longitude: 34.77998
  time_zone: Asia/Jerusalem
  unit_system: metric
  elevation: 67
  customize: !include customize.yaml

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

sensor:
  - platform: time_date
    display_options:
     - date_time
  - platform: systemmonitor
    resources:
     - type: disk_use_percent
     - type: memory_use_percent
     - type: ipv4_address
     - type: processor_use
     - type: last_boot

jewish_calendar:
  language: hebrew
  candle_lighting_minutes_before_sunset: 40

smartir:


frontend:
  themes: !include themes.yaml

it’s very important for me to use this feature.
Currently, it shows me that the time for lighting candle in shabbat is 2019-11-15 14:02:00+00:00, and havdalah time is - 2019-11-16 15:20:00+00:00
The date and time of the system is correct.
i’m using version 2.12 (stable), and recently updated the hassio system to version 0.101.3.
Thank you in advance!

Hi
You find how fix it?

Have you set your location ? Either via the “configurations - general” section. Or via a ‘home’ zone in the zones file.
If you type “{{ sensor.time }}” into the template editor on the developer tools page, what do you get ?

Yes the timezone ok.

Execute shell command
Command executed: date: 0
Mon Nov 11 22:02:44 IST 2019

date

Blockquote

No, the sensor.time entity

The sensor.time entity show the original time zone time
Any idea what the problem?

Nope, not clear.
Does sensor.time show the correct time for you ?
You are gmt +2 correct ?

Yes.
Sensor.time show me +2

Again, not clear
It shows you plus 2 ???
Do you mean you are in gmt +2 and that’s what the sensor tells you (so it’s the correct time) ?
Or it it +2 hours off your local time ?

Have you set your location as per my post above ?

This the problem.
Jerusalem zone is +2. The lighting candle show +0

Hi Matt.
Thanks for trying to help.
I defined in configuration.yaml the time zone as - Asia/Jerusalem which is GMT+2.
went to template in developer tools and entered - {{ sensor.time }} as you suggested, and got the following error:
Error rendering template: UndefinedError: ‘sensor’ is undefined.
however, in my home screen - the date & time is correct.
somehow, all the times of the jewish calendar are showing as + 00:00.

Hello Matt.

I have the same issue with Jewish calendar, the time zone is Asia/Jerusalem (GMT+2) and the local time is OK.
But the sensor are using UTC clock, it’s mean the sensor is 2H behindhand… this happened after software upgrade 0.101.3.
BTW, The last version are add +2 to the UTC clock then sensor acting as the local time.

Thanks.

The component was reworked aparently between 100 and 101. It purposely outputs in UTC (Don’t ask me why because I don’t know why).

All you guys need to do is make a timestamp sensor template using the timestamp attribute and you should be good to go.

EDIT: So the Frontend (lovelace) should already translate the timestamp. But if you need to make use of the sensors as automations, you need to convert it to your own timezone. This can be done by with what I said above. If you guys post a screenshot of the state & attributes in the developer tools / states page, I can help with templates.

And this issue contains some useful templates at the bottom (ignore the center ones).

Hi Petro.
All i want to do is to show the correct hadlaket nerot time in lovelace.
currently, it is showing the time in UTC format as you said.
I tried to look at the link you added and find some help there, but didn’t succeeded to convert the timestamp to timestamp_local.
in the thread you added, Tzvi wrote:
" Your code can be very much be simplified. Pass the timestamp attribute from the sensor to the timestamp_local / timestamp_custom filters."
But how do i pass the timestamp attribute from the sensor to timestamp_local??

make a template sensor:

sensor:
- platform: template
  sensors:
    hadlaket_nerot_time:
      value_template: >
        {{ state_attr('sensor.jewish_calendar_plag_hamincha','timestamp') }}
      device_class: timestamp

That will tell you when it will occur, i.e. 4 hours and 3 minutes from now. if you just want the time you need to convert it

sensor:
- platform: template
  sensors:
    hadlaket_nerot_time:
      value_template: >
        {{ state_attr('sensor.jewish_calendar_plag_hamincha','timestamp') | timestamp_custom("%H:%M", True) }}