Fix unnecessary-return-none in tradfri (#122950)

This commit is contained in:
epenet 2024-07-31 20:42:19 +02:00 committed by GitHub
parent 177690bcb3
commit 7c179c33b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,11 +73,11 @@ class TradfriSwitch(TradfriBaseEntity, SwitchEntity):
async def async_turn_off(self, **kwargs: Any) -> None:
"""Instruct the switch to turn off."""
if not self._device_control:
return None
return
await self._api(self._device_control.set_state(False))
async def async_turn_on(self, **kwargs: Any) -> None:
"""Instruct the switch to turn on."""
if not self._device_control:
return None
return
await self._api(self._device_control.set_state(True))