Dear all, first of all sorry for the basic question as I’m just staring with HA.
I was able to install Hassio on a cheap chinese tablet and so far so good.
My only consern is while automating a sonoff switch being triggered by a xiaomi movement sensor (controlled by xiaomi gateway). While I’m able to see status changes in HA and activating the sonoff switch without any issue, I’m not able to make the automation to really work.
I’ve two xiaomi movement sensors in the backyard and I want to activate a sonoff switch if movement is detected in any of the sensors (automation only works when i first save it but then it stops). If I force the automation to run the switch is activated but is not triggered automatically.
can somene point me to the right direction ?
My yaml file:
- id: '1594855455737'
alias: Turn the light on when motion is detected bodega
description: ''
trigger:
- entity_id: binary_sensor.motion_sensor_158d0002f9a610
from: 'off'
platform: state
to: 'on'
- entity_id: binary_sensor.motion_sensor_158d000358e953
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
before: sunrise
condition: sun
action:
- data: {}
entity_id: switch.sonoff_1000b01d2a
service: switch.turn_on