Changing lighting group with pico remote

Hi all,

I have 3 lighting groups that I’m trying to control individually with one Pico remote. My goal is to use the on/off and up/down buttons as normal, but be able to switch between lighting groups with the “stop” button.

Is this even possible, and if so, could someone point me in the right direction? I’m brand new to this platform and don’t even know where to begin looking for what mechanisms would be involved with such a script. I’ve done a fair bit of programming in the past so I’m not afraid to get down and dirty with documentation, I just don’t even know what direction to start heading in.

Much appreciated.

The usual way it’s done is to create an automation that’s triggered by the event produced when you press the ‘stop’ button (using either an Event Trigger or Device Trigger). The automation then proceeds to perform your desired action (select the next lighting group from a list of three lighting groups).

You can create an Input Select containing three options where each option’s name is a lighting group’s entity_id (i.e. light.group1).

When the automation detects the ‘stop’ button’s “press” event, it simply uses the input_select.select_next service call to set the Input Select’s current value to the value of its next option. In other words, every time you press the ‘stop’ button, the Input Select’s current value changes to the entity_id of the next lighting group.

The automation that detects the other button events (pressing on/off and up/down) uses the Input Select’s current value to determine which lighting group to control.

- service: light.turn_on
  target:
    entity_id: "{{ states('input_select.lighting') }}"

All of this can be done in a single automation that’s triggered by the five button events (press on, off, up, down, stop).

Ooh! That’s great. Thanks so much for the help. I’ll give it a try later today.

Much appreciated.

Ok I now realize the folly of my previous line of thinking: I don’t know how to store which group I chose and send that into a new automation, but then you stated that it all could be done in one automation. Having looked around the forums quite a bit it seems like that approach is way over my head at the moment: templates and event triggers and such.

I’d like to learn it, but I have no idea where to start. Could you point me in the right direction?

TIA

I thought my previous served that purpose. It explained you have to start with this:

Were you able to complete that step?

Sorry, yes, I meant to say that I was able to create an input select, but as I was writing the post I was also doing some more research and that part of it just went out of my head.