Closed ildar170975 closed 4 months ago
Are you sure? That's not supposed to work.
tap_action: { "action": "toggle" }
would, though, since json is valid yaml.
And so would
tap_action:
{ "action": "toggle" }
I just took an example from Docs (w/o "confirmation"):
but may be I am missing smth.
Probably the "pipe" not needed (cannot test right now).
This is definitely about the "pipe":
tap_action: |
{
"action": "toggle",
"confirmation": {
"text": "{{states('sun.sun')}}",
},
}
tap_action:
{
"action": "toggle",
"confirmation": {
"text": "hello",
},
}
When you add the pipe it turns into a string. And JSON strings ARE processed, but ONLY if they are the result of a template. Since yours doesn't include a template, that whole workflow is ignored. So it's sort of in the grey zone...
Strange, this functionality used to work.
Consider this:
Here
tap_action
works only in the 2nd row.ver 1.4.0 2024.2.1