I tried setting msg.service in the inject node to {{turn_on}}, but that isn’t working.
This is part of an experiment to clean up one of my flows. I am turning selected lights on or off. Some are MQTT and some are Home Assistant service calls. My current flow works, but it is spaghettified because I have separate call service nodes for turn_on or turn_off. If I could inject the service (turn_on_ or turn_off) I could clean up the flow considerably.
If by this you mean in comparison to YAML, just an FYI the two are completely interchangeable. YAML is really just a way of presenting JSON that is more readable for humans, often applications will convert YAML to JSON in order to ingest it.
If you’re familiar with YAML but not getting the hang of JSON I would recommend playing around with a tool like YAML to JSON. Then you can punch in the YAML you want and have it make the JSON for you. Then you can start to see how one translates into the other so you can get the hang of it.
Thanks, I discovered this a few weeks ago. If YAML is supposed to be more readable for humans, then I am not human. Give me a struct in C++ and, I get it. But YAML and JSON are still my weak spot.
Just to clarify, YAML is supposed to be more readable for humans in comparison to JSON. So I definitely wouldn’t say someone who has trouble reading YAML isn’t human. Being more readable then JSON is a pretty low bar lol.