Create a scene with climate information

Is it possible to create a scene with the climate entities? I’d like to create an automation when the door opens, the heating turns off and when the door closes, the temperature goes back to its previous state. So far, I managed to turn the heating off and on again, but it goes in an predefined state. And when the heatings is manual turned higher or lower, it still goes back to the predefined state.

I never used a scene with a climate, but if you look at the example on the docs, a scene is created on the fly and includes a climate entity:

# Example automation using snapshot
- alias: "Window opened"
  trigger:
  - platform: state
    entity_id: binary_sensor.window
    from: "off"
    to: "on"
  condition: []
  action:
  - service: scene.create
    data:
      scene_id: before
      snapshot_entities:
      - climate.ecobee
      - light.ceiling_lights
  - service: light.turn_off
    target:
      entity_id: light.ceiling_lights
  - service: climate.set_hvac_mode
    target:
      entity_id: climate.ecobee
    data:
      hvac_mode: "off"
- alias: "Window closed"
  trigger:
  - platform: state
    entity_id: binary_sensor.window
    from: "on"
    to: "off"
  condition: []
  action:
  - service: scene.turn_on
    target:
      entity_id: scene.before

Thank you. I missed the “snapshot_entities”. I used “entities”. I changed it and now it works. Thank you.

1 Like