Fix implicit-return in deconz (#122836)

pull/122874/head
epenet 2024-07-30 17:21:45 +02:00 committed by GitHub
parent 896cd27bea
commit 8066c7dec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class DeconzFan(DeconzDevice[Light], FanEntity):
async def async_set_percentage(self, percentage: int) -> None:
"""Set the speed percentage of the fan."""
if percentage == 0:
return await self.async_turn_off()
await self.async_turn_off()
return
await self.hub.api.lights.lights.set_state(
id=self._device.resource_id,
fan_speed=percentage_to_ordered_list_item(