I am trying to get my inovelli red series dimmer to turn off my tp link switch off when I hit the switch 3 times . Here is what I have that is not working currently:
You’ve put raw JSON in the event_data rather than YAML
You’ve specified far more fields than are typically needed there. Focus on the things that make the event unique, and it just looks for the fields you specify.
Your indentation and spacing in the action: section is incorrect
I tried this and it did not work. I just want to make sure it is correct that I am inputting this into visual studio code under a new file I have named goodnight.yaml. Is that part correct on my end?
FYI raw json works in place of yaml. However, his raw json was wrong as the first key (domain) did not have quotes around it. That would cause it to fail.
So in regards to the solution you posted, this would also work:
That’s fair and correct, but it’s far more cumbersome and easier for humans to screw up. I think it’s better for folks to manually add the tags and values they need in YAML, as they’ll see in all the docs and most or all posts, rather then just copying/pasting from the Events output, even if it ends up being valid.
I wasn’t trying to say what I was writing is better than yours. I was simply pointing out that you can use JSON. If you didn’t say this:
I wouldn’t have responded.
And yes I agree, everything should be written as yaml. But I’m not going around telling everyone that you can’t use json. I honestly thought you didn’t think it was possible, hence my reply.