Tile launches pop-up instead of running script

I created a script to toggle lights in an area called Christmas Lights. Then I created a tile to run the script, but when clicking the tile it brings up a popup screen with a run button, instead of just running the script. Obviously to just turn lights on or off, I don’t want that extra step.

Is there something I missed when setting up the tile or the script? I did everything through the GUI, but…
The script code looks like this:

action: switch.toggle
metadata: {}
data: {}
target:
  area_id: christmas_lights

The tile code looks like this:

type: tile
entity: script.all_christmas_lights
grid_options:
  columns: 12
  rows: 1

Is there a better way to do this like separate on/off commands instead of toggle?

You can edit the tiles interaction setting and do the toggling there.

1 Like

See ´tap_action`

1 Like

That does fix the main problem, but now it seems the status doesn’t show. Is there a way to have the button or tile show on/off when the devices in the area are on or all off? It seems to just be dark or gray as if they are all off.

Have you tried the Area card?
For the tile card to fit your needs you need to make a group but that wont work dynamically through the area I think.
Another way is a template with the state of the lights from an area ( this may help you to code that) and then set that as a trigger for an automation, which controls a dummy switch (toggle helper) which you set as the entity in the tile card.