Sensor time +00:00 or +01:00? Weird behaviour

Hi,
What I’m trying to do is retrieve two times from a simple REST API, and do some automations with it

My JSON looks like this

{
"start": "20:33",
"stop": "20:34"
}

When I use the this code in my sensors.yaml

- platform: rest
  resource: MyURL
  name: starting_time_from_rest
  device_class: timestamp
  value_template: "{{ today_at(value_json.start) }}"
  scan_interval: 10

The value of the starting_time_from_rest is formatted like this 2023-02-25T19:33:00+00:00 .
I can create an automation based on this and this works fine.

But because I need 2 sensors from the same API end point, but I don’t want to poll the same endpoint twice. After reading the docs I ended up with this code in my configuration.yaml . (Doesn’t work when I put it in sensors.yaml)

rest:
  scan_interval: 10
  resource: MyURL
  sensor:
    - name: "starting_time_from_rest"
      value_template: "{{ today_at(value_json.start) }}"
    - name: "stopping_time_from_rest"
      value_template: "{{ today_at(value_json.stop) }}"

But now the value of the starting_time_from_rest is formatted like this 2023-02-25 20:33:00+01:00
, so the time went one hour up and +00:00 changed to +00:00 (differant timezones?) and now the automation doesn’t work anymore.

Again no clue why this is the case and how to fix this… Any help here?

What is your time zone?

2023-02-25T19:33:00+00:00 and 2023-02-25 20:33:00+01:00 is the same time, but noted with different timezones.
This indicate that you are looking at the value in two different places and they have a different way of showing the value in relation to timezones.

Found it!
In my defintion in sensors.yaml I had this line

device_class: timestamp

which was not in my definition in my configuration.yaml. Added it and voila!