Introducing My Project AGS Service: A Custom Integration for Home Assistant

Hello Home Assistant Community!

Today, I am excited to introduce my very first project: AGS Service. The name stands for Auto Grouping Speaker Service, and it was born out of a need to better manage and group audio devices in different rooms of my home.

AGS Service is a custom Home Assistant integration that allows you to configure speakers and rooms, and it automatically updates the groups based on the state of the speakers and the rooms. While it was designed and tested with Sonos speakers and LG TVs, it may work with other devices supported by Home Assistant as well.

The AGS Service integration creates four sensors and a switch for each room. These sensors provide a wealth of information including lists of configured rooms, active rooms, active speakers, and inactive speakers. The switches allow you to manually control whether a room is active or not.

Now, as this is my first project, I am eager to hear your feedback and suggestions. I am sharing this in the hopes that it might be useful to others in the Home Assistant community. You can find the project on GitHub Feel free to create an issue or pull request if you have any suggestions or improvements.

AGS Service is compatible with HACS as a custom repository. I’ll work on submitting to HACs at a later time.

Remember, we’re all here to learn, grow, and create a better smart home experience. I look forward to hearing your thoughts on AGS Service.

Happy automating!

1 Like

Why do you include your pyc files in the repo.

Not to mention the .DS_store files?

Thank you for pointing that out, they were auto generated with my files and I forgot to remove before putting on GitHub. I have removed those from the project now

I see you are reading other switch states which are created by the integration.

Apart from any entity renaming risk, it would be hard to manage in the future.

Rather, you can keep custom integration state inside hass and all switches and sensors just update their selves whenever internal state is changed

Thank you for the advice , i was thinking about making a change like that so the switch code for on/off would update the hass data set and rest would go off of that . I think that’s probably the next enhancement I’ll do

This could help: Fetching Data | Home Assistant Developer Docs

1 Like

Thank you for the advice, I have not implemented that change to the code. I think I am gonna move to move the automation function into the integration at some point.