Map bond fan speeds to standard HA speeds (#37808)
This commit is contained in:
1 parent
9e8e5c37f4
commit
95e72b4c4b
4 files changed
+88
-20
No files matched your search
@@ -28,9 +28,16 @@ async def setup_bond_entity(
|
||||
|
||||
|
||||
async def setup_platform(
|
||||
hass: core.HomeAssistant, platform: str, discovered_device: Dict[str, Any]
|
||||
hass: core.HomeAssistant,
|
||||
platform: str,
|
||||
discovered_device: Dict[str, Any],
|
||||
bond_device_id: str = "bond-device-id",
|
||||
props: Dict[str, Any] = None,
|
||||
):
|
||||
"""Set up the specified Bond platform."""
|
||||
if not props:
|
||||
props = {}
|
||||
|
||||
mock_entry = MockConfigEntry(
|
||||
domain=BOND_DOMAIN,
|
||||
data={CONF_HOST: "1.1.1.1", CONF_ACCESS_TOKEN: "test-token"},
|
||||
@@ -41,11 +48,13 @@ async def setup_platform(
|
||||
"homeassistant.components.bond.Bond.getVersion", return_value=MOCK_HUB_VERSION
|
||||
), patch(
|
||||
"homeassistant.components.bond.Bond.getDeviceIds",
|
||||
return_value=["bond-device-id"],
|
||||
return_value=[bond_device_id],
|
||||
), patch(
|
||||
"homeassistant.components.bond.Bond.getDevice", return_value=discovered_device
|
||||
), patch(
|
||||
"homeassistant.components.bond.Bond.getDeviceState", return_value={}
|
||||
), patch(
|
||||
"homeassistant.components.bond.Bond.getProperties", return_value=props
|
||||
):
|
||||
assert await async_setup_component(hass, BOND_DOMAIN, {})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
Reference in new issue
Block a user