Template wrong due to timezone?

Hi,

I’ve got an automation which should run at a specified time, saved in a input_datetime, as defined in this config:

input_datetime:
 robbie_start_time:
   name: Start time
   has_date: false
   has_time: true

This template generates a time which is 1 hour off…

"{{ state_attr('input_datetime.robbie_start_time', 'timestamp') | int | timestamp_custom('%H:%M', True) }}"

So probably this has something to do with the timezone, but I have set it like this:

homeassistant:
  time_zone: 'Europe/Brussels'

Anyone knows how to solve this?

Thanks
Cadish

Stupid me… timestamp_custom('%H:%M', True) needed to be timestamp_custom('%H:%M', False) of course…

1 Like