ZHA group and device cleanup (#31260)
* add dispatching of groups to light * added ha device registry device id * added zha group object * add group event listener * add and remove group members * get group by name * api cleanup * clean up get device info * create and remove zigpy groups * clean up create and remove group api * use device id * use device id * cleanup * update test * update tests to allow group events to flow
This commit is contained in:
1 parent
6bbb713013
commit
f4a4c6bea5
7 files changed
+289
-189
No files matched your search
@@ -50,9 +50,10 @@ async def zha_gateway_fixture(hass, config_entry):
|
||||
gateway.ha_device_registry = dev_reg
|
||||
gateway.application_controller = mock.MagicMock(spec_set=ControllerApplication)
|
||||
groups = zigpy.group.Groups(gateway.application_controller)
|
||||
groups.listener_event = mock.MagicMock()
|
||||
groups.add_listener(gateway)
|
||||
groups.add_group(FIXTURE_GRP_ID, FIXTURE_GRP_NAME, suppress_event=True)
|
||||
gateway.application_controller.groups = groups
|
||||
gateway.application_controller.configure_mock(groups=groups)
|
||||
gateway._initialize_groups()
|
||||
return gateway
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user