Snapshot doesn't restore correct mode on climate

Hi,

I’m trying to create a automation which should do the following:

  • if kitchen window is opened:
    • save the current state of kitchen heater, then turn it off
  • if window is closed:
    • set kitchen heater to saved state

I found this example here in the HASSIO docs and adjusted it to my needs: Scenes - Home Assistant

My current automation has the problem, that when the window is closed, the state of the heater is always set to ‘heat’, even if the state before was ‘auto’ or ‘off’.

Here are my automations as yaml:

Automation for ‘Window open’:

alias: "Kitchen: Window open - Heater off"
description: ""
trigger:
  - platform: state
    entity_id:
    # my kitchen window sensor
      - binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_5
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 5
condition: []
action:
  - service: scene.create
    data:
      scene_id: kitchen_heater_before
      snapshot_entities:
        - climate.kitchen
  - service: climate.set_hvac_mode
    target:
      entity_id: climate.kitchen
    data:
      hvac_mode: "off"
mode: single

Automation for ‘Window closed’:

alias: "Kitchen: Window closed - Heater to last state"
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_5
    from: "on"
    to: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 5
condition: []
action:
  - service: scene.turn_on
    target:
      entity_id: scene.kitchen_heater_before
    data: {}
mode: single

Does anyone know how to get it working correctly?

Nobody knows anything about this? I´m a little bit lost. Maybe someone has an idea where I can start searching? Maybe somehow with the developer tools? :thinking:

Did you found out what happened? I have the same issue.

Did anyone solve this, I am having the same issue also.

I also have this issue with a Tado thermostat.

Tado is set to auto, I save a scene with current state of the climate entity then turn off. When I activate the scene, climate entity is set to heat (meaning Tado’s schedule stops working).