Trying to understand xiaomi config

Hi All,

Relatively new user to home assistant. Managed to wire up a newly purchased xiaomi starter kit, couple of yeelights and Wake On Lan for my computer.

I don’t have a particular problem but don’t understand a bit of the config in Hi All,

Relatively new user to home assistant. Managed to wire up a newly purchased xiaomi starter kit, couple of yeelights and Wake On Lan for my computer.

I don’t have a particular problem but don’t understand a bit of the config page in Hi All,

Relatively new user to home assistant. Managed to wire up a newly purchased xiaomi starter kit, couple of yeelights and Wake On Lan for my computer.

I don’t have a particular problem but don’t understand a bit of the example on the motion section https://home-assistant.io/components/binary_sensor.xiaomi_aqara/#motion

The action for turning on the light when dark states

 action:
    - service: light.turn_on
      entity_id: light.gateway_light_34ce00xxxx11
      data:
        brightness: 5
    - service: automation.turn_on
      data:
        entity_id: automation.MOTION_OFF

I understand the first service but not the second. Re-reading it now I’m guessing it’s making a particular automation active (i.e. allowing it to activate) BUT if that’s true I have 2 issues:

  1. I can’t see how automation.MOTION_OFF is assigned to the next automation ‘- alias: If there no motion for 5 minutes turn off the gateway light’ from what I can tell the entity id will become a slug for the alias so something like ‘automation.if_there_no_…’

  2. Is it even necessary? the trigger is ‘from on to off for 5 minutes’. I am guessing that it’s trying to only turn it off if the previous automation turned it on. (i.e. so if I turn on the light when it’s bright and trigger the automation sensor, I won’t turn it off)

I’d like to know if my reading is correct, and if it is a means to protect the automation from happening arbitrarily, is that the best way?

Thanks for the help!

Hello @ewanrw,

same here, and now with hassio 0.106.4 i have a warning : “Unable to find referenced entities automation.motion_off”

Have you try without

- service: automation.turn_on
      data:
        entity_id: automation.motion_off

?

thanks

I’m getting “Unable to find referenced entities” for no reason as well… I can’t call a script from an automation.