Homekit controller BLE groundwork (#20538)

* Define the characteristics to poll (or subscribe to) up front

* Configure characteristics immediately instead of during first poll

* Do as much cover configuration upfront as possible

* Remove test workaround as no longer needed

* Remove switch code that is already handled by HomeKitEntity

* Remove lock code already handled by HomeKitEntity

* Remove light code already handled by HomeKitEntity

* Remove alarm code already handled by HomeKitEntity

* Remove climate code already handled by HomeKitEntity
This commit is contained in:
Jc2k authored and Martin Hjelmare committed 2019-01-28 17:21:20 +01:00
1 parent 995758b8ac
commit 41c1997b88
9 files changed
+177 -72

No files matched your search

@@ -8,7 +8,7 @@ from homekit.model.characteristics import (
from homekit.model import Accessory, get_id
from homeassistant.components.homekit_controller import (
DOMAIN, HOMEKIT_ACCESSORY_DISPATCH, SERVICE_HOMEKIT, HomeKitEntity)
DOMAIN, HOMEKIT_ACCESSORY_DISPATCH, SERVICE_HOMEKIT)
from homeassistant.setup import async_setup_component
import homeassistant.util.dt as dt_util
from tests.common import async_fire_time_changed, fire_service_discovered
@@ -168,8 +168,7 @@ async def setup_test_component(hass, services):
}
}
with mock.patch.object(HomeKitEntity, 'name', 'testdevice'):
fire_service_discovered(hass, SERVICE_HOMEKIT, discovery_info)
await hass.async_block_till_done()
fire_service_discovered(hass, SERVICE_HOMEKIT, discovery_info)
await hass.async_block_till_done()
return Helper(hass, '.'.join((domain, 'testdevice')), pairing, accessory)