blueprint: name: climate_heat_save description: Turn off climate (thermostat) because of open window domain: automation author: Tiziano Trabattoni input: window_sensor: name: Window Status description: Identifies the Window Sensor Device for Opened Status selector: entity: filter: - device_class: door domain: binary_sensor climate_target: name: Termostat Control description: Identifies the Thermostat climate to control selector: entity: filter: - domain: climate ext_temp_limit: name: Temperature range active description: Identifies the temperature max that enable the saving default: 18 selector: number: min: 0 max: 30 # binary_sensor.bagnoovest_finestra_contact triggers: - trigger: state entity_id: !input window_sensor conditions: - condition: numeric_state entity_id: sensor.esterno_temperature below: !input ext_temp_limit actions: - choose: - conditions: - condition: state entity_id: !input window_sensor state: "Open" sequence: - action: climate.set_hvac_mode metadata: {} data: hvac_mode: "off" target: entity_id: !input climate_target - action: switch.turn_on metadata: {} data: {} target: device_id: 62352ecf274ff68e3ddfbc979406d49d - action: notify.mobile_app_ttrabatt_iphone15pro metadata: {} data: message: Home Assistant DEBUG title: Dovrebbe essere finestra aperta - conditions: - condition: state entity_id: !input window_sensor state: "Closed" sequence: - action: climate.set_hvac_mode metadata: {} data: hvac_mode: "heat" target: entity_id: !input climate_target - action: switch.turn_off metadata: {} data: {} target: device_id: 62352ecf274ff68e3ddfbc979406d49d - action: notify.mobile_app_ttrabatt_iphone15pro metadata: {} data: message: Home Assistant DEBUG title: Dovrebbe essere finestra chiusa default: - action: notify.mobile_app_ttrabatt_iphone15pro metadata: {} data: title: HA script error message: > le condizioni non vanno cazzo: state: {{ states('binary_sensor.salottopt_finestra_contact') }} # - if: # - condition: state # entity_id: !input window_sensor # state: "true" # for: # hours: 0 # minutes: 0 # seconds: 10 # then: # - action: climate.set_hvac_mode # metadata: {} # data: # hvac_mode: "off" # target: # entity_id: !input climate_target # else: # - action: climate.set_hvac_mode # metadata: {} # data: # hvac_mode: heat # target: # entity_id: !input climate_target # mode: single