Floorplan Lights On/Off Button Click Help

I have a button on my floorplan that I want to turn off all the lights. In Inkscape I have a text field over the button that says Lights On/Off. When I open HA the button says Off, when ANY light is turned on the button says On, I would like it to always say Lights On/Off. The lights do toggle as expected.

Do I need to use onClick in InkScape instead of the way I’ve set this up?

I’ve include my floorplan config as a starting pointing, would appreciate anyone pointing me in the right direction. Thanks

- name: lights
  entities:
    - switch.lamp_salt
    - switch.lamp_lr
    - switch.lamp_br1
    - switch.light_hall2
  states:
    - state: 'on'
      class: 'light-on'
    - state: 'off'
      class: 'light-off'
  action:
    service: toggle

- name: all_lights
  entities:
    - group.lights
  action:
    service: toggle
1 Like

Not sure if i have interpreted correctly but…

You want the text to say ON/OFF instead of on OR off depending on the lights status ?

if thats the case just add static ON/ OFF text and remove the (group.lights from it) and then just add that object ide to a rect in front that is clear that way you can still switch it…

Solved in post 408 thru 416 of Share your Floorplan