mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Prevent double ZHA channel initialization (#36554)
* Preven double channel initialization. * Use a setter for setting ZHA device availability.
This commit is contained in:
@@ -65,7 +65,7 @@ async def coordinator(hass, zigpy_device_mock, zha_device_joined):
|
||||
node_descriptor=b"\xf8\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",
|
||||
)
|
||||
zha_device = await zha_device_joined(zigpy_device)
|
||||
zha_device.set_available(True)
|
||||
zha_device.available = True
|
||||
return zha_device
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ async def device_fan_1(hass, zigpy_device_mock, zha_device_joined):
|
||||
ieee=IEEE_GROUPABLE_DEVICE,
|
||||
)
|
||||
zha_device = await zha_device_joined(zigpy_device)
|
||||
zha_device.set_available(True)
|
||||
zha_device.available = True
|
||||
return zha_device
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ async def device_fan_2(hass, zigpy_device_mock, zha_device_joined):
|
||||
ieee=IEEE_GROUPABLE_DEVICE2,
|
||||
)
|
||||
zha_device = await zha_device_joined(zigpy_device)
|
||||
zha_device.set_available(True)
|
||||
zha_device.available = True
|
||||
return zha_device
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user