It’s still in its early stages, but I’d love to hear what you think. Do you have any ideas or suggestions for the repositories? If you do, you can tell me by opening an issue on GitHub or you can just leave a comment here.
If you use MQTT (or simply have the broker installed/running) there is a work around for this.
You can use an MQTT Switch, with:
Retain: true
Set the command_topic and state_topic to the same value.
That defines an MQTT switch, however it functions the same as an input boolean - the only difference being that internally it identifies as a switch, so it can be used in a switch group.
I do appreciate the work to solve the root issue, but frankly I think a better solution would be to fix the design flaw in Home Assistant, specifically:
I understand why there are different group types - to allow different functionality to be exposed in each group (fans, lights, etc).
However I think a switch group should be a special case - it should be possible to add anything that can be switched (on/off) into a switch group** that way if you want to have a group that turns on your: heating, lights, a fan, input booleans and your garbage disposal you can.
I thought about suggesting adding a new “switchable” group but that would quickly lead to confusion about what is the difference between a switch group and a switchable group…
Thanks for the feedback and for sharing this workaround!
• Regarding the MQTT approach: It is actually a very clever trick. My integration aims to help users who don’t use MQTT, or who simply prefer a “plug-and-play” solution directly from the UI without having to write YAML or rely on external add-ons.
• Regarding the HA design flaw: I completely agree with your point. It would be incredibly convenient if the standard switch group could accept any entity with an on/off state. Unfortunately, HA’s current Core architecture ties groups very strictly to their specific domains to handle service calls properly.
I built this integration to patch a specific gap right now, making things easier while we wait (and hope) for Home Assistant to become more flexible natively in the future.
Is it really necessary to create new type of services? Could you just use the same services and if entity passed is the one from your integration, you extract entities in the group and pass the call further?
The above blueprints filter the entities for just Input booleans, but they could be modified to allow any toggle-able entity type. I suspect the combination of Labels and the expanded “purpose-specific” triggers and conditions will make these kind of grouping entities less useful/necessary in the not-to-distant future.