Hi all,
I have the following automation, to open garage door when I am close to home. Lately I added some or conditions in order to open the door when I am in the car only. Last days something is wrong with the or conditions (I think) and nothing happens. Although I check and the status is in_vechicle or the person is away, when I use the debug mode it stops in the or conditions. Can someone check the automation please?
- id: Open Garage Door when close to home
alias: Open Garage Door when close to home
trigger:
- platform: zone
entity_id: device_tracker.makis_smartphone
zone: zone.myhome
event: enter # or "leave"
- platform: zone
entity_id: device_tracker.makis_smartphone
zone: zone.myhome2
event: enter # or "leave"
- platform: zone
entity_id: device_tracker.makis_smartphone
zone: zone.myhome3
event: enter # or "leave"
- platform: zone
entity_id: device_tracker.makis_smartphone
zone: zone.myhome4
event: enter # or "leave"
condition:
- condition: or
conditions:
- condition: state
entity_id: device_tracker.makis_smartphone
state: in_vehicle
- condition: template
value_template: "{{state_attr('device_tracker.makis_smartphone', 'speed') >= 3}}"
- condition: template
value_template: "{{ 'A0:56:B2:1F:87:36' in state_attr('sensor.makis_smartphone_bluetooth_connection', 'connected_paired_devices') }}"
- condition: state
entity_id: timer.garage_door_inputboolean
state: 'idle'
- condition: state
entity_id: binary_sensor.garage_door_d1mini
state: 'off'
- condition: state
entity_id: sensor.makis_home
state: 'away'
for:
minutes: '5'
action:
- service: timer.start
entity_id: timer.garage_door_inputboolean
- service: switch.toggle
data:
entity_id: switch.sonoff_100082f95b
and here is the debug ( I saw statis on mobile HA and it was “in_vechcle”
Executed: September 2, 2022 at 00:09:15
Result:
result: false
conditions/0
Executed: September 2, 2022 at 00:09:15
Result:
result: false
conditions/0/entity_id/0
Executed: September 2, 2022 at 00:09:15
Result:
result: false
state: home
wanted_state: in_vehicle
conditions/1
Executed: September 2, 2022 at 00:09:15
Result:
result: false
entities:
- device_tracker.makis_smartphone
conditions/2
Executed: September 2, 2022 at 00:09:15
Result:
result: false
entities:
- sensor.makis_smartphone_bluetooth_connection