Lazy loading of service descriptions (#11479)
* Lazy loading of service descriptions * Fix tests * Load YAML in executor * Return a copy of available services to allow mutations * Remove lint * Add zha/services.yaml * Only cache descriptions for known services * Remove lint * Remove description loading during service registration * Remove description parameter from async_register * Test async_get_all_descriptions * Remove lint * Fix typos from multi-edit * Remove unused arguments * Remove unused import os * Remove unused import os, part 2 * Remove unneeded coroutine decorator * Only use executor for loading files * Cleanups suggested in review * Increase test coverage * Fix races in existing tests
This commit is contained in:
parent
3cbd77f6ac
commit
8267a21bfe
85 changed files with 253 additions and 729 deletions
|
@ -345,6 +345,7 @@ class TestComponentsDeviceTracker(unittest.TestCase):
|
|||
CONF_PLATFORM: 'test',
|
||||
device_tracker.CONF_CONSIDER_HOME: 59,
|
||||
}})
|
||||
self.hass.block_till_done()
|
||||
|
||||
self.assertEqual(STATE_HOME,
|
||||
self.hass.states.get('device_tracker.dev1').state)
|
||||
|
@ -586,6 +587,7 @@ class TestComponentsDeviceTracker(unittest.TestCase):
|
|||
CONF_PLATFORM: 'test',
|
||||
device_tracker.CONF_CONSIDER_HOME: 59,
|
||||
}})
|
||||
self.hass.block_till_done()
|
||||
|
||||
state = self.hass.states.get('device_tracker.dev1')
|
||||
attrs = state.attributes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue