Make ZHA load quirks earlier (#123027)
parent
7670ad0a72
commit
5446dd92a9
|
@ -117,6 +117,8 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
||||||
ha_zha_data.config_entry = config_entry
|
ha_zha_data.config_entry = config_entry
|
||||||
zha_lib_data: ZHAData = create_zha_config(hass, ha_zha_data)
|
zha_lib_data: ZHAData = create_zha_config(hass, ha_zha_data)
|
||||||
|
|
||||||
|
zha_gateway = await Gateway.async_from_config(zha_lib_data)
|
||||||
|
|
||||||
# Load and cache device trigger information early
|
# Load and cache device trigger information early
|
||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
radio_mgr = ZhaRadioManager.from_config_entry(hass, config_entry)
|
radio_mgr = ZhaRadioManager.from_config_entry(hass, config_entry)
|
||||||
|
@ -140,7 +142,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
||||||
_LOGGER.debug("Trigger cache: %s", zha_lib_data.device_trigger_cache)
|
_LOGGER.debug("Trigger cache: %s", zha_lib_data.device_trigger_cache)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
zha_gateway = await Gateway.async_from_config(zha_lib_data)
|
await zha_gateway.async_initialize()
|
||||||
except NetworkSettingsInconsistent as exc:
|
except NetworkSettingsInconsistent as exc:
|
||||||
await warn_on_inconsistent_network_settings(
|
await warn_on_inconsistent_network_settings(
|
||||||
hass,
|
hass,
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"zha",
|
"zha",
|
||||||
"universal_silabs_flasher"
|
"universal_silabs_flasher"
|
||||||
],
|
],
|
||||||
"requirements": ["universal-silabs-flasher==0.0.22", "zha==0.0.24"],
|
"requirements": ["universal-silabs-flasher==0.0.22", "zha==0.0.25"],
|
||||||
"usb": [
|
"usb": [
|
||||||
{
|
{
|
||||||
"vid": "10C4",
|
"vid": "10C4",
|
||||||
|
|
|
@ -2989,7 +2989,7 @@ zeroconf==0.132.2
|
||||||
zeversolar==0.3.1
|
zeversolar==0.3.1
|
||||||
|
|
||||||
# homeassistant.components.zha
|
# homeassistant.components.zha
|
||||||
zha==0.0.24
|
zha==0.0.25
|
||||||
|
|
||||||
# homeassistant.components.zhong_hong
|
# homeassistant.components.zhong_hong
|
||||||
zhong-hong-hvac==1.0.12
|
zhong-hong-hvac==1.0.12
|
||||||
|
|
|
@ -2363,7 +2363,7 @@ zeroconf==0.132.2
|
||||||
zeversolar==0.3.1
|
zeversolar==0.3.1
|
||||||
|
|
||||||
# homeassistant.components.zha
|
# homeassistant.components.zha
|
||||||
zha==0.0.24
|
zha==0.0.25
|
||||||
|
|
||||||
# homeassistant.components.zwave_js
|
# homeassistant.components.zwave_js
|
||||||
zwave-js-server-python==0.57.0
|
zwave-js-server-python==0.57.0
|
||||||
|
|
|
@ -148,7 +148,7 @@ async def test_multipan_firmware_repair(
|
||||||
autospec=True,
|
autospec=True,
|
||||||
),
|
),
|
||||||
patch(
|
patch(
|
||||||
"homeassistant.components.zha.Gateway.async_from_config",
|
"homeassistant.components.zha.Gateway.async_initialize",
|
||||||
side_effect=RuntimeError(),
|
side_effect=RuntimeError(),
|
||||||
),
|
),
|
||||||
patch(
|
patch(
|
||||||
|
@ -199,7 +199,7 @@ async def test_multipan_firmware_no_repair_on_probe_failure(
|
||||||
autospec=True,
|
autospec=True,
|
||||||
),
|
),
|
||||||
patch(
|
patch(
|
||||||
"homeassistant.components.zha.Gateway.async_from_config",
|
"homeassistant.components.zha.Gateway.async_initialize",
|
||||||
side_effect=RuntimeError(),
|
side_effect=RuntimeError(),
|
||||||
),
|
),
|
||||||
):
|
):
|
||||||
|
@ -236,7 +236,7 @@ async def test_multipan_firmware_retry_on_probe_ezsp(
|
||||||
autospec=True,
|
autospec=True,
|
||||||
),
|
),
|
||||||
patch(
|
patch(
|
||||||
"homeassistant.components.zha.Gateway.async_from_config",
|
"homeassistant.components.zha.Gateway.async_initialize",
|
||||||
side_effect=RuntimeError(),
|
side_effect=RuntimeError(),
|
||||||
),
|
),
|
||||||
):
|
):
|
||||||
|
@ -311,7 +311,7 @@ async def test_inconsistent_settings_keep_new(
|
||||||
old_state = network_backup
|
old_state = network_backup
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.zha.Gateway.async_from_config",
|
"homeassistant.components.zha.Gateway.async_initialize",
|
||||||
side_effect=NetworkSettingsInconsistent(
|
side_effect=NetworkSettingsInconsistent(
|
||||||
message="Network settings are inconsistent",
|
message="Network settings are inconsistent",
|
||||||
new_state=new_state,
|
new_state=new_state,
|
||||||
|
@ -390,7 +390,7 @@ async def test_inconsistent_settings_restore_old(
|
||||||
old_state = network_backup
|
old_state = network_backup
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.zha.Gateway.async_from_config",
|
"homeassistant.components.zha.Gateway.async_initialize",
|
||||||
side_effect=NetworkSettingsInconsistent(
|
side_effect=NetworkSettingsInconsistent(
|
||||||
message="Network settings are inconsistent",
|
message="Network settings are inconsistent",
|
||||||
new_state=new_state,
|
new_state=new_state,
|
||||||
|
|
Loading…
Reference in New Issue