Handle older Izone controller (#45218)

* Updated to new library
* Fixed config flow exception
pull/45222/head
Penny Wood 2021-01-16 21:24:00 +08:00 committed by GitHub
parent 2044b33eb6
commit 7c7b357357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -6,6 +6,7 @@ import logging
from async_timeout import timeout
from homeassistant import config_entries
from homeassistant.core import callback
from homeassistant.helpers import config_entry_flow
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -18,9 +19,12 @@ _LOGGER = logging.getLogger(__name__)
async def _async_has_devices(hass):
controller_ready = asyncio.Event()
async_dispatcher_connect(
hass, DISPATCH_CONTROLLER_DISCOVERED, lambda x: controller_ready.set()
)
@callback
def dispatch_discovered(_):
controller_ready.set()
async_dispatcher_connect(hass, DISPATCH_CONTROLLER_DISCOVERED, dispatch_discovered)
disco = await async_start_discovery_service(hass)

View File

@ -2,7 +2,7 @@
"domain": "izone",
"name": "iZone",
"documentation": "https://www.home-assistant.io/integrations/izone",
"requirements": ["python-izone==1.1.2"],
"requirements": ["python-izone==1.1.3"],
"codeowners": ["@Swamp-Ig"],
"config_flow": true
}

View File

@ -1768,7 +1768,7 @@ python-gitlab==1.6.0
python-hpilo==4.3
# homeassistant.components.izone
python-izone==1.1.2
python-izone==1.1.3
# homeassistant.components.joaoapps_join
python-join-api==0.0.6

View File

@ -882,7 +882,7 @@ python-ecobee-api==0.2.8
python-forecastio==1.4.0
# homeassistant.components.izone
python-izone==1.1.2
python-izone==1.1.3
# homeassistant.components.juicenet
python-juicenet==1.0.1