When I turn ON this switch from the UI it perform the action of the script of ON, but the switch don´t toggle ON and if I want to turn off I need to dcuble click the button fast to turn off before the entity turn off it self.
It behaves that way because the value_template is self-referential and that’s invalid. It should report the state of whatever device your script is controlling.
Ohh nice, thanks! I would try, I already have rooms in the hue app, but in hassio I only see the scene of the rooms in the developer tools page, do you know how can I use the rooms of the hue app in hassio?
That’s true, a Hue group will automatically appear in Developer Tools > States but not in the Lovelace UI. All you have to do is use an Entities card to add it to the UI.