I am new here and try to make a automation work on hassio. On motion i want to turn on a light but i dont know why it wil not turn on.
This is in my automations.yaml and i add automations.yaml in the config file.
- id: beweging licht aan
alias: 'licht aan'
trigger:
platform: state
entity_id: binary_sensor.woonkamer_beweging
from: 'off'
to: 'on'
action:
service: light.turn_on
entity_id: light.bf19b8bb789510a78eue48
After 2 days i almost beginning to pull out some hairs.
Well, both lines under action need to be moved left one space. But if that’s not it…
Is the automation on? Does the motion sensor actually change from off to on? What do you mean by “and i add automations.yaml in the config file”? Does manually triggering the automation work?
thank you for the reply. I have change the positions under action but nothing happend. I can see that the motion sensor gets triggert that is working. i think the automation is not on, can you tell how to turn it on? I have all my device on hassio and really want to automate this.
Also forgot to ask, did you reload automations at Configuration > Server Control after creating the automation? And what do you mean by “and i add automations.yaml in the config file”?
Check if the automation is on by going to Developer Tools > States and typing automation in the entity filter field. Then look for this automation and see if it reports a state of on.
in config.yaml i add (under default_config:)automation: !include automations.yaml. In automations.yaml i added the code. I have reloaded the automations under server props and also reboot hassio but now i see i dont have any automation in developer tools> states.
I found the problem, !include automations.yaml i set on the wrong place. know the automation works thank you al for sending me in the right direction!!!