In Lovelace, i want to display one button that shows the whether 1 or more lights in a group is on (by a yellow bulb icon), or all off (blue bulb icon). When pressing the button in Lovelace, i want the light group to toggle status (so from off to on, or from on to off).
I do get a button with a bulb, the bulb is yellow or blue depending on the state of light.living_room_central . But when i press the button, only that lamp is toggled. Based on the last 2 lines of code, i would expect all bulbs in the group to toggle.
As you can see, i also tried using “group.living_room_group” in the 2nd line of the code: than the group gets toggled, but the button stays blue (so doesn’t show whether a light in the group is on).
when you use toggle as the tap action, the card does not use a service call. If you want to toggle another item, change tap_action to call-service, and then use homeassistant.toggle as the service.
Thanks for your reply @petro. Changed the code. I now do have an icon showing the correct status, but upon pressing the button, i see in the UI a call to homeassistant.toggle is made, but the lights in the group don’t change. (Btw, while trying to solve this, i also learned a toggle on a group also means if not all lights are on, the ones that are off, actually will turn on … but leave that for now)