Hi, I can't seem to grasp how I should go about doing what I need: I have 24 relays. I can toggle them individually using UI buttons, and obviously, I can trigger a group of relays with a UI button as well. But what I'm trying to do is to allow the user to select which relay trigger in what group. A dynamic assignement for each relay. I can't seem to wrap my head around the right way to do it ?
If I want to assign any relay (1 to 24) to groups A, B, C or D (and store said assignment), should I create 24 dropdowns buttons to assign the group, have that assignment create a group topic and use that to create a button to call on that group ? How can I store the assignment to make it resilient ?
To be clear on the desired outcome, an example of user selection would look like :
1,2,4, 6, 9 to Group A,
3,5,7,8 to Group B,
10, 11,12 to Group C,
13, 14,15,17,20 to Group D
and 16,18,19 unassigned.
In the dashboard, UI toggles "Group A", "Group B", etc would toggle relays on/off assigned to that group.
User could change assignments at will.
Suggestions are appreciated to push me in the (a) proper direction, seems to me that I'm the one making it complicated