Save temperature

Hi.

I have radiator termostat. I want to set up when window is oppened that hassio rember temperature and then when window is closed that this saved temperature is set back again?

Does any of you have same configuration done?

I would recommend to store your current temperature withn an input_number as soon as the window is openend and read it back into the thermostat if the window is closed again :slight_smile:

Depending on your thermostat device, you can link/bind a window opening sensor to the thermostate. Does work even without HA.

I tought of that but did not find any example how to store and read temperature

here is an example I just wrote (untested).
Please note that for this kind of automations (temporary storing ones) it is important to select “queued” mode as if not fast open/close actions might cause a “restore” faster than a “backup” action.

  - id: window_climate_bath
    alias: window_climate_bath
    mode: queued
    trigger:
      - id: 'window_opened'
        platform: state
        entity_id: binary_sensor.strips_window_door_is_open
        to: 'on'
      - id: 'window_close'
        platform: state
        entity_id: binary_sensor.strips_window_door_is_open
        to: 'off'            
    action:
      - choose:
          - conditions: 
              - condition: trigger
                id: 'window_opened'
            sequence:
              - service: input_number.set_value
                data_template:
                  value: "{{ state_attr('climate.hmip_bwth_bath','temperature') }}"
                  entity_id: input_number.hmip_bwth_bath_temp    
          - conditions: 
              - condition: trigger
                id: 'window_close'
            sequence:
              - service: climate.set_temperature
                data_template:
                  temperature: "{{ states('input_number.hmip_bwth_bath_temp') }}"
                  entity_id: climate.hmip_bwth_bath