Add Blebox switch support (#35371)
* support BleBox switches * fix tox py37 test failures * refactor BleBox device class map
This commit is contained in:
1 parent
064321c21e
commit
890013cecf
6 files changed
+437
-7
No files matched your search
@@ -76,12 +76,19 @@ def feature(request):
|
||||
return request.getfixturevalue(request.param)
|
||||
|
||||
|
||||
async def async_setup_entity(hass, config, entity_id):
|
||||
"""Return a configured entity with the given entity_id."""
|
||||
async def async_setup_entities(hass, config, entity_ids):
|
||||
"""Return configured entries with the given entity ids."""
|
||||
|
||||
config_entry = mock_config()
|
||||
config_entry.add_to_hass(hass)
|
||||
assert await async_setup_component(hass, DOMAIN, config)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
entity_registry = await hass.helpers.entity_registry.async_get_registry()
|
||||
return entity_registry.async_get(entity_id)
|
||||
return [entity_registry.async_get(entity_id) for entity_id in entity_ids]
|
||||
|
||||
|
||||
async def async_setup_entity(hass, config, entity_id):
|
||||
"""Return a configured entry with the given entity_id."""
|
||||
|
||||
return (await async_setup_entities(hass, config, [entity_id]))[0]
|
||||
Reference in new issue
Block a user