Fix incorrect use of Platform enum in zha tests (#163150)

This commit is contained in:
epenet
2026-02-16 13:47:29 +01:00
committed by GitHub
parent 3ee20d5e5c
commit 27d715e26a

View File

@@ -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
)