I’m trying to unlock a door if I can detect that either one of two phones are home after I’ve tripped one of my sensors. My YAML appears to be valid - but HASS is not liking it.
Scripts do accept or conditions, right?
Here’s what it says:
ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [script]: [condition] is an invalid option for [script]. Check: script->script->unlock_auto->sequence->0->condition.
And here’s what it doesn’t like:
unlock_auto:
sequence:
- condition:
condition: or
conditions:
- condition: state
entity_id: 'device_tracker.phone1'
state: 'home'
- condition: state
entity_id: 'device_tracker.phone2'
state: 'home'
- service: lock.unlock
entity_id:
- lock.lock1_lock_locked_20_0
I did try moving the block up, but it didn’t work. The script condition docs appear to say my syntax is right:
I tried @Danielhiversen’s example - but condition or: doesn’t appear to be valid: ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [script]: [condition or] is an invalid option for [script].