Untitled
alias: Heating Control Automation - Livingroom description: >- Control heating with dynamic temperature, Away Mode, 0.5°C margin, and window sensors triggers: - entity_id: - sensor.livingroom_temperature_sensor_temperature - binary_sensor.isnighthelper - input_boolean.away_mode - input_number.temp_away - input_number.temp_night - input_number.temp_day trigger: state - entity_id: - binary_sensor.door_window_sensor_livingroom_contact - binary_sensor.door_window_sensor_kitchen_contact to: "on" for: minutes: 1 trigger: state conditions: [] actions: - variables: desired_temperature: | {% if states('input_boolean.away_mode') == 'on' %} {{ states('input_number.temp_away')|float }} {% elif states('binary_sensor.isnighthelper') == 'on' %} {{ states('input_number.temp_night')|float }} {% else %} {{ states('input_number.temp_day')|float }} {% endif %} - choose: - conditions: - condition: or conditions: - condition: state entity_id: binary_sensor.door_window_sensor_livingroom_contact state: "on" - condition: state entity_id: binary_sensor.door_window_sensor_kitchen_contact state: "on" sequence: - target: entity_id: climate.heater_livingroom action: climate.turn_off data: {} - conditions: - condition: template value_template: > {{ states('sensor.livingroom_temperature_sensor_temperature')|float < (desired_temperature - 0.5) }} - condition: and conditions: - condition: state entity_id: binary_sensor.door_window_sensor_livingroom_contact state: "off" - condition: state entity_id: binary_sensor.door_window_sensor_kitchen_contact state: "off" sequence: - target: entity_id: climate.heater_livingroom action: climate.turn_on data: {} - conditions: - condition: template value_template: > {{ states('sensor.livingroom_temperature_sensor_temperature')|float >= desired_temperature }} sequence: - target: entity_id: climate.heater_livingroom action: climate.turn_off data: {} mode: single
Leave a Comment