Hello people. I’m trying to automate my AC to turn on if my room gets too hot. I’ve also set a boolean helper where I could tell it that I don’t want it to handle the cooling automatically. My problem is if the room is already above the temperatures I’ve set before I’ve told it to handle cooling automatically, will the triggers not work anymore since they do not cross the temperature threshold? Is there any way to fix this? Thanks in advance.
alias: Turn AC on if room is too hot
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.none_indoor_temperature
for:
hours: 1
minutes: 0
seconds: 0
above: 29
id: room_above_29
- platform: numeric_state
entity_id:
- sensor.none_indoor_temperature
above: 32
id: room_at_32
for:
hours: 0
minutes: 0
seconds: 0
- platform: numeric_state
entity_id:
- sensor.none_outdoor_temperature
for:
hours: 2
minutes: 0
seconds: 0
above: 32
id: outdoor_above_32
condition:
- condition: device
device_id: 58e1854de54ed1c84a0d36e415595ffe
domain: device_tracker
entity_id: 8b04318a81843cd1c1a28ed7f404a9b7
type: is_home
- condition: state
entity_id: climate.midea_ac_147334558192167
state: "off"
- condition: time
after: "06:00:00"
before: "01:00:00"
- condition: state
entity_id: input_boolean.allow_cooling_automatically
state: "on"
action:
- service: climate.set_hvac_mode
metadata: {}
data:
hvac_mode: cool
target:
entity_id: climate.midea_ac_147334558192167
- service: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.ac_turned_on_automatically
- if:
- condition: trigger
id:
- room_at_30
then:
- parallel:
- device_id: 58e1854de54ed1c84a0d36e415595ffe
domain: mobile_app
type: notify
message: Room temperature above 30°C
title: Turned AC on
- device_id: 2093dfc937731c28924695ec5ace0132
domain: mobile_app
type: notify
message: Room temperature above 30°C
title: Turned AC on
else:
- if:
- condition: trigger
id:
- outdoor_above_32
then:
- parallel:
- device_id: 58e1854de54ed1c84a0d36e415595ffe
domain: mobile_app
type: notify
message: Outdoor temperature above 32°C
title: Turned AC on
- device_id: 2093dfc937731c28924695ec5ace0132
domain: mobile_app
type: notify
message: Outdoor temperature above 32°C
title: Turned AC on
else:
- parallel:
- device_id: 58e1854de54ed1c84a0d36e415595ffe
domain: mobile_app
type: notify
message: Room temperature too hot
title: Turned AC on
- device_id: 2093dfc937731c28924695ec5ace0132
domain: mobile_app
type: notify
message: Room temperature too hot
title: Turned AC on
alias: Notify device with what triggered
mode: single