1
0
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:
Alexei Chetroi
2020-06-08 08:54:52 -04:00
committed by GitHub
parent 8ed1b1782e
commit 1bdbe90d2a
9 changed files with 30 additions and 26 deletions

View File

@@ -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