Differences in hours : automations late

Hi everybody,

I’m transfering my configuration from Hassbian AIO to Hass.io !
It works well but I have got a trouble in hours !

When I write date in the shell, the right local hour is displayed.

  - platform: template
    sensors:
      minuteur_1_end:
        friendly_name: 'End : '
        value_template: '{{ ((now().strftime("%s") | int + (states("input_number.minuteur_reglable_1") | int) * 60) | timestamp_custom("%H:%M")) }}'

But if I use this code, it displayed UTC hours…
I hadn’t this problem in the AIO…

Do you have a solution ?

Thank you !!!

Try timestamp_local :slight_smile:

Hi !!
I’m back for a solution !

it needs to replace now() by utcnow():

- platform: template
    sensors:
      minuteur_1_end:
        friendly_name: 'End : '
        value_template: '{{ ((utcnow().strftime("%s") | int + (states("input_number.minuteur_reglable_1") | int) * 60) | timestamp_custom("%H:%M")) }}'

Thank you @AlmostSerious for a beginning solution !!