Condition not stopping the automation

I have an automation that works well… Turn the AC on when the temperature is over 79.
I’m trying to add a condition that stops the automation from turning on the AC if the sliding door is open. No matter what I try, the automation starts whether the door is open or closed (on or off).
I’m doing this in the visual editor if that matters. Thanks

We need to see the code, I think… :grinning_face_with_smiling_eyes:

1 Like
alias: Living Room Above 78
description: Turns on AC
trigger:
  - platform: numeric_state
    entity_id: sensor.first_floor_average
    above: 79
    alias: When First Floor Average is above 79
  - platform: numeric_state
    entity_id: sensor.first_floor_average
    above: 78.5
    alias: When First Floor Average is above 79.5
  - platform: numeric_state
    entity_id: sensor.first_floor_average
    above: 80
    alias: When First Floor Average is above 80
condition:
  - type: is_off
    condition: device
    device_id: 720733ed3c75db353cfbd1dc4b8ef6b8
    entity_id: binary_sensor.sengled_slidingdoor
    domain: binary_sensor
action:
  - service: climate.set_hvac_mode
    data:
      hvac_mode: dry
    target:
      entity_id: climate.living_room_minisplit
  - service: climate.set_fan_mode
    data:
      fan_mode: quiet
    target:
      entity_id: climate.living_room_minisplit
mode: single

Not sure this will make it work, but why the device condition? Wouldn’t this do?

condition: state
entity_id: binary_sensor.sengled_slidingdoor
state: "off"

Thanks, I’ll give it a try. I’m just trying a lot of different things, state, device, etc!

Entity states are better because there is no magical number (device id) in the definition. If you need to somehow remove the integration and add it back, device id might change but hopefully entity names would stick

1 Like