That is a script, not an automation… The spacing is wrong before sequence, it has three spaces and should have only two. Apart from that I can’t see anything wrong.
The spacing is correct (2 spaces). In my message it’s displayed as 3 spaces, I don’t know why.
The content of the automation shouldn’t be of importance here since I just want to trigger the switch of the automation in HA. Here is the automation anyway (all spaces correct), it works perfectly:
id: testautomation
initial_state: ‘on’
trigger:
platform: state
entity_id: binary_sensor.fibaro_motion_sensor
from: ‘off’
to: ‘on’
action:
For what i can see on the forums and on the docs, it is possible to turn on/off an automation from an automation. But i don’t see nothing saying that you can do it from a script…
I think that your best bet is to create an automation that turns off testautomation (for example testautomation_off) and then call it from the script, like this:
2018-01-13 16:00:35 ERROR (MainThread) [homeassistant.core] Invalid service data for script.turn_on: Entity ID is an invalid entity id for dictionary value @ data[‘entity_id’]. Got ‘’
2018-01-13 16:00:41 ERROR (MainThread) [homeassistant.core] Invalid service data for script.turn_on: Entity ID is an invalid entity id for dictionary value @ data[‘entity_id’]. Got ‘’