Fix dependencies to account for Select type. Also fixup errors in Fan due to movement in dependencies.

This commit is contained in:
sibowler
2021-12-14 19:49:10 +11:00
committed by rospogrigio
parent 1b53c22791
commit 5a4167fe5b
2 changed files with 9 additions and 3 deletions

View File

@@ -79,7 +79,13 @@ class LocaltuyaFan(LocalTuyaEntity, FanEntity):
"""Get the list of available speeds."""
return [SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH]
async def async_turn_on(self, speed: str = None, **kwargs) -> None:
async def async_turn_on(
self,
speed: str = None,
percentage: int = None,
preset_mode: str = None,
**kwargs,
) -> None:
"""Turn on the entity."""
await self._device.set_dp(True, self._dp_id)
if speed is not None: