How can I add/remove groups and add/remove group members from within a custom component?
Why?
I created a PlexDevices which I’d like to dynamically create the following groups and dynamically keep their memberships in sync:
Connected (shows currently connected plex devices)
Disconnected (shows disconnected plex devices)
All (combination or connected and disconnected plex devices)
This enables you to see and control any device that connects, as they connect, etc. (without needing to know all client names and addd them to a group manually).
I imagine this is a simple thing, just need to be pointed int he right direction. I’ve tried create_group and creating a new group via the EntityComponent. I was able to get a group created and members added - it just won’t display in the HA homepage.
@JesseWebDotCom: where exactly in your code did you put this last snippet of code? I’m looking to do the same but am still struggling with how everything sits together behind the scenes.