From 7c179c33b5499ff15154b41f5f61f335535d961b Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 31 Jul 2024 20:42:19 +0200 Subject: [PATCH] Fix unnecessary-return-none in tradfri (#122950) --- homeassistant/components/tradfri/switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tradfri/switch.py b/homeassistant/components/tradfri/switch.py index 4ad1424aa9a..20695f26500 100644 --- a/homeassistant/components/tradfri/switch.py +++ b/homeassistant/components/tradfri/switch.py @@ -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))