Managed to successfully set up climate automations for my air conditions (running on a Sensibo).
Using template sensors to get the “inside” temperature (and humidity) from attributes of the A/C entity:
#A/C sensors
- platform: template
sensors:
downstairs_temp:
friendly_name: 'Downstairs temperature'
unit_of_measurement: '°C'
device_class: temperature
value_template: "{{ state_attr('climate.master_bedroom_a_c', 'current_temperature') }}"
downstairs_humidity:
friendly_name: 'Downstairs humidity'
unit_of_measurement: '%'
device_class: humidity
value_template: "{{ state_attr('climate.master_bedroom_a_c', 'current_humidity') }}"
Then set up a threshold binary sensor using those temperatures:
binary_sensor:
- platform: threshold
entity_id: sensor.downstairs_temp
lower: 16
upper: 24
hysteresis: 0.0
name: downstairs_temp_thres
Then automated turning on before bedtime (with temperature and someone-at-home conditions):
#Sensibo night automation - master bedroom
#Turn on at 6.45pm
- alias: 'Downstairs AC night on'
trigger:
- platform: state
entity_id: binary_sensor.downstairs_temp_thres
from: 'on'
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: time
after: '16:45:00'
before: '06:00:00'
action:
- service: climate.turn_on
entity_id: climate.master_bedroom_a_c
- service: climate.set_temperature
data:
entity_id: climate.master_bedroom_a_c
temperature: 22
- service: climate.set_swing_mode
data:
entity_id: climate.master_bedroom_a_c
swing_mode: fixedTop
- service: climate.set_fan_mode
data:
entity_id: climate.master_bedroom_a_c
fan_mode: auto
As well as “turn off” automation for temperature back in range:
#Turn on if out of range
- alias: 'Downstairs AC range off'
trigger:
- platform: state
entity_id: binary_sensor.downstairs_temp_thres
from: 'off'
to: 'on'
for:
minutes: 30
action:
- service: climate.turn_off
entity_id: climate.master_bedroom_a_c
For everyone leaves the house (not tested yet):
#Turn on if no-one home
- alias: 'Downstairs AC absent off'
trigger:
- platform: state
entity_id: group.all_devices
from: 'home'
to: 'not_home'
for:
minutes: 30
action:
- service: climate.turn_off
entity_id: climate.master_bedroom_a_c
And turning of in the morning (not tested yet):
#Turn off at 6.00am
- alias: 'Downstairs AC morning'
trigger:
platform: time
at: "06:00:00"
action:
- service: climate.turn_off
entity_id: climate.master_bedroom_a_c