Question regarding toggle in cards for entire rooms

Hello all! Im a total noob with HA and have 0 coding skills, so forgive me if im asking stupid questions.

Anyways, im trying to make a toggle for an entire room, like " turn off all lights in the office". Im experimenting with cards, and can toggle the lights one by one, but cant seem to make a button to turn them all off. Can someone help?

Like this: Plz ignore the epic photoshop skills i have.

Put the switches in an entities card. That card has a global toggle button built in.

1 Like

Thanks! that did it for me. Now comes a second problem. Is it possible to create a toggle button that toggles all the global toggles? (as in, 1 button and all lights in all rooms go out.)

You need to create a script for that. Or place all lights into one big group.

i have no idea how to write scripts ._. help?

Settings → Devices & services → Helpers. Find and select the group from the list. Add all your light entitles. Call it “All Lights”

Add light.all_lights to your dashboard.