Closed maximilianriemensberger closed 3 years ago
Great idea creating GroupConnection dynamically!
Removing
register_for_inputs()
from GroupConnection will break some functionality within HomeAssistant. There's nothing bad about it... Just have to keep it in mind.
Which functionality? It must have been a dead-end registration since input will never arrive. If you can point me to the breakage, I can certainly try to fix it up if it's not too difficult.
Which functionality? It must have been a dead-end registration since input will never arrive. If you can point me to the breakage, I can certainly try to fix it up if it's not too difficult.
Yes, it is a dead-end registration. For convenience, modules and groups are handled exactly the same way. Adding a single if-condition will resolve the breakage. Never mind.
Sure. I'll try to keep an eye on potential HomeAssitant breakage in the future.
Draft as basis for discussion of #58.
I decided to create and destroy
GroupConnection
objects on the fly instead of storing one for each group permanently. Storing in a separate collection e.g.group_conns
would easily be possible as well. But since they don't carry any state right now, I saw no reason to do so. If something like aStatusRequestHandler
were to be added to theGroupConnection
, then they clearly have to be stored again to have a persistent base for activating and canceling the handlers.