What do you think is wrong with the indentation? I am checking it with the File Editor - and it doesn’t give me warning for indentation. Plus, I am keeping the indentation as per the other automations, which are running fine.
I read that the device_id is generated when you create an automation through the automation from the UI. I am trying to get away from the UI as some of my automations which are working won’t work when I go and create a new one from UI. Apparently, it is this way due to how YAML interacts with Python.
Devices are assigned device_ids when they’re created by the integration, not when an automation is created. I think getting away from the UI is valuable, but there’s no relationship between YAML and Python and how devices are addressed.
When this kind of indentation is working, everything is fine; I always use the automation editor for testing my code before I release it and so I suggested another way of indentation.
But:
If wether the „blueprint“ examples for device actions (see Rob‘s one), nor a service action (as Chris suggested) are working flawlessly, then I would suspect an error somewhere in another automation. Is the automation above the only one you tested recently?
Woke up in the morning - and did this and it worked wanted to punch myself in the face
I was using the YAML in GUI generated templates to create my own, and it calls on the type and that clearly didnt work, but the service call surely works.