Status and trigger with 1 button (input_boolean)

Hi there all. When I changed from physical switched and leds as status/control panel to a tablet, I run into a brain staking issue…

The old situation was: When group.binnenverlichting was on, then the LED on the statuspanel was on.
When I pushed the button on the statuspanel, it turned off group.binnenverlichting off.
If it was off and the button was pushed, it called scene.thuiskomen, and since all the lights in that scene belonged to group.binnenvelichting, the status LED came on.
The led also turned on if any other entity from the same group was turned on, with not is part of the scene.

But now I got rid of the physical control panel and have no clue how to set it up in a similar way.

I want an input_boolean to call scene.thuiskomen and activate the boolean.
The boolean status must be activated as well if any of the entities from group.binnenverlichting is on. Even if scene.thuiskomen is not triggered.
And turn off the whole group as the boolean turns off.

But here I end in a circle,
In all the ways I’ve tried this is what happens:

If any entity from the group.binnenverlichtig is turned on, the boolean will turn on.
With that it will immediately activate the scene. And that is not the wanted behaviour. I want the scene only be activated when the boolean is pressed on the tablet.

I think that I need an extra step in this routine, but I don’t know where or what…
I think it will be simple logic, but it is breaking my brains :stuck_out_tongue:

Hope someone can help me out, may be an automation, may also be node-red.

:thinking:
So, which of those is true?

And that’s my question, maybe there is a whole different approach to my problem.

Basicly: I would like to have 1 button on my tablet for:

  • Turn on the scene.binnenverlichting/ turn off group.binnenverlichting
  • And show the state of group.binnenverlichting

I think I found my solution: Template light, I will now dive into that… :wink:

Indeed, it was template_light:

light:
  - platform: template
  lights:
    thuiskomen:
      friendly_name: Thuiskomen
      value_template: "{{ states.group.binnenverlichting.state }}"
      turn_on:
        service: scene.turn_on
        data:
          entity_id: scene.thuiskomen
      turn_off:
        service: light.turn_off
        data:
          entity_id: group.binnenverlichting