AC automation help

Hi,

I’m trying to make this automation work but something is wrong.
If i trigger it manually it works just fine.

If the temperature is above 26c, turn on the AC but only when someone is at home.

- id: '1558522201471'
  alias: AC on
  trigger:
  - above: '26'
    entity_id: sensor.living_room_sensor_temperature
    platform: numeric_state
  condition:
  - condition: state
    entity_id: group.all_devices
    state: home
  action:
  - entity_id: climate.living_room_ac
    service: climate.turn_on

Can anyone help me out ?

Thank you :smiley:

try

initial_state: true

also think the

above:'26' 

show be

above: 26

as its a numeric_state asking for a number not a text value ‘26’

and the

state: home

mite need to be

state:'home'
1 Like

I forgot to say thank you @myle :smiley: ! works perfectly !

This automation is good for only when you’re already home and it gets above 26.

Ι would go this way:

- id: '1558522201471'
  alias: AC on
  trigger:
  - above: 26
    entity_id: sensor.living_room_sensor_temperature
    platform: numeric_state
  - platform: state
    entity_id: group.all_devices
    to: "home"
  condition:
  - condition: state
    entity_id: group.all_devices
    state: "home"
 -  condition: numeric_state
    entity_id: sensor.living_room_sensor_temperature
    above: 26
  action:
  - entity_id: climate.living_room_ac
    service: climate.turn_on

This way, it would work like yours (When you’re already home and it gets above 26) but it will also work when you get home and it’s already above 26

1 Like