Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96123

What is wrong with these conditions?

$
0
0

@mirekmal wrote:

I have automation that opens garage door when I come home. Here is the code I use(d):

- id: 'mirek_returned_home'
  alias: 'Mirek returns home'
  initial_state: true
  trigger:
    platform: zone
    entity_id: device_tracker.life360_miroslaw_malinowski
    zone: zone.near_home
    event: enter
  condition:
    - condition: state
      entity_id: sensor.mirek_car_presence
      state: 'Garage is empty'
    - condition: state
      entity_id: sensor.garage_mirek
      state: 'closed'
  action:
    - service: script.toggle_mirek_garage_door

Few notes about conditons I have:

  • I want garage not open when my car is in garage (obviosu, no need if car is already there)
  • I do not want garage to close accidentaly, if it was opened already when I was approaching home (I do not see the garage from the distance, so I could hurt someone with unexpectedly closing door).
  • trigger works fine, tested on separate automation
  • script to toggle the door also work fine, tested…

Automation was working perfectly until (I think) upgrade to 0.106.x…
I was doing some troubleshooting about differens aspects of this automation and I narrowed problem to conditions, that seems not to be met, even if sensors report states properly. If I remove conditions section everything is fine. Any idea?

Posts: 4

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles