Update blueprints/automations/bzo_climate.yaml

Edit presence detection.
This commit is contained in:
2025-07-30 12:05:46 +03:00
parent adcec21a5c
commit e82bc55d63

View File

@@ -1,4 +1,4 @@
blueprint: blueprint:
name: BZO's Smart Climate Controller name: BZO's Smart Climate Controller
description: > description: >
Automatically control a climate device based on indoor/outdoor temperatures, Automatically control a climate device based on indoor/outdoor temperatures,
@@ -150,12 +150,12 @@ blueprint:
- info - info
- debug - debug
mode: restart mode: restart
max_exceeded: silent max_exceeded: silent
trigger_variables: trigger_variables:
override_switch: !input override_switch override_switch: !input override_switch
trigger: trigger:
- platform: time_pattern - platform: time_pattern
minutes: "/5" minutes: "/5"
- platform: state - platform: state
@@ -164,7 +164,7 @@ trigger:
- platform: state - platform: state
entity_id: !input target_temp_helper entity_id: !input target_temp_helper
condition: condition:
- condition: template - condition: template
value_template: > value_template: >
{{ override_switch == '' or is_state( override_switch, 'off') }} {{ override_switch == '' or is_state( override_switch, 'off') }}
@@ -179,7 +179,7 @@ condition:
# {% set window = window_sensor %} # {% set window = window_sensor %}
# {{ window == '' or is_state(window, 'off') }} # {{ window == '' or is_state(window, 'off') }}
action: action:
- variables: - variables:
climate: !input climate_entity climate: !input climate_entity
room_sensor: !input room_temp_sensor room_sensor: !input room_temp_sensor
@@ -193,6 +193,7 @@ action:
delta_high: !input delta_fan_high delta_high: !input delta_fan_high
threshold: !input external_temp_threshold threshold: !input external_temp_threshold
override_switch: !input override_switch override_switch: !input override_switch
presence_entity: !input presence_entity
room_temp: > room_temp: >
{% set r = states(room_sensor) %} {% set r = states(room_sensor) %}
@@ -251,6 +252,21 @@ action:
message: "A/C turned off because schedule is OFF" message: "A/C turned off because schedule is OFF"
entity_id: !input climate_entity entity_id: !input climate_entity
- choose:
- conditions:
- condition: template
value_template: >
{{ is_state(presence_entity, 'not_home') }}
sequence:
- service: climate.turn_off
target:
entity_id: !input climate_entity
- service: logbook.log
data:
name: "Smart Climate"
message: "A/C turned off because no one is home"
entity_id: !input climate_entity
- choose: - choose:
- conditions: - conditions:
- condition: template - condition: template