mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add PowerLevelController for fan to alexa (#27158)
* Implement AlexaPowerLevelController * Implement AlexaPowerLevelController Tests
This commit is contained in:
committed by
Paulus Schoutsen
parent
565302ed34
commit
af81878d08
@@ -340,6 +340,7 @@ async def test_variable_fan(hass):
|
||||
appliance,
|
||||
"Alexa.PercentageController",
|
||||
"Alexa.PowerController",
|
||||
"Alexa.PowerLevelController",
|
||||
"Alexa.EndpointHealth",
|
||||
)
|
||||
|
||||
@@ -364,6 +365,27 @@ async def test_variable_fan(hass):
|
||||
"speed",
|
||||
)
|
||||
|
||||
call, _ = await assert_request_calls_service(
|
||||
"Alexa.PowerLevelController",
|
||||
"SetPowerLevel",
|
||||
"fan#test_2",
|
||||
"fan.set_speed",
|
||||
hass,
|
||||
payload={"powerLevel": "50"},
|
||||
)
|
||||
assert call.data["speed"] == "medium"
|
||||
|
||||
await assert_percentage_changes(
|
||||
hass,
|
||||
[("high", "-5"), ("high", "5"), ("low", "-80")],
|
||||
"Alexa.PowerLevelController",
|
||||
"AdjustPowerLevel",
|
||||
"fan#test_2",
|
||||
"powerLevelDelta",
|
||||
"fan.set_speed",
|
||||
"speed",
|
||||
)
|
||||
|
||||
|
||||
async def test_lock(hass):
|
||||
"""Test lock discovery."""
|
||||
|
||||
Reference in New Issue
Block a user