mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 07:05:48 +01:00
Fix incorrect use of Platform enum in zha tests (#163150)
This commit is contained in:
@@ -156,14 +156,14 @@ async def async_turn_on(hass: HomeAssistant, entity_id, percentage=None):
|
||||
if value is not None
|
||||
}
|
||||
|
||||
await hass.services.async_call(Platform.FAN, SERVICE_TURN_ON, data, blocking=True)
|
||||
await hass.services.async_call(FAN_DOMAIN, SERVICE_TURN_ON, data, blocking=True)
|
||||
|
||||
|
||||
async def async_turn_off(hass: HomeAssistant, entity_id):
|
||||
"""Turn fan off."""
|
||||
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
|
||||
|
||||
await hass.services.async_call(Platform.FAN, SERVICE_TURN_OFF, data, blocking=True)
|
||||
await hass.services.async_call(FAN_DOMAIN, SERVICE_TURN_OFF, data, blocking=True)
|
||||
|
||||
|
||||
async def async_set_percentage(hass: HomeAssistant, entity_id, percentage=None):
|
||||
@@ -175,7 +175,7 @@ async def async_set_percentage(hass: HomeAssistant, entity_id, percentage=None):
|
||||
}
|
||||
|
||||
await hass.services.async_call(
|
||||
Platform.FAN, SERVICE_SET_PERCENTAGE, data, blocking=True
|
||||
FAN_DOMAIN, SERVICE_SET_PERCENTAGE, data, blocking=True
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user