From e9f5c4188eec41db6f3a18eeb23b243a43bda5f9 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 20 Jul 2024 11:12:41 +0200 Subject: [PATCH] Fix incompatible signature overwrite async_turn_on + off (#122208) --- homeassistant/components/ecoforest/switch.py | 5 +++-- homeassistant/components/v2c/switch.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/ecoforest/switch.py b/homeassistant/components/ecoforest/switch.py index f59970aa751..d643217bebc 100644 --- a/homeassistant/components/ecoforest/switch.py +++ b/homeassistant/components/ecoforest/switch.py @@ -4,6 +4,7 @@ from __future__ import annotations from collections.abc import Awaitable, Callable from dataclasses import dataclass +from typing import Any from pyecoforest.api import EcoforestApi from pyecoforest.models.device import Device @@ -61,12 +62,12 @@ class EcoforestSwitchEntity(EcoforestEntity, SwitchEntity): """Return the state of the ecoforest device.""" return self.entity_description.value_fn(self.data) - async def async_turn_on(self): + async def async_turn_on(self, **kwargs: Any) -> None: """Turn on the ecoforest device.""" await self.entity_description.switch_fn(self.coordinator.api, True) await self.coordinator.async_request_refresh() - async def async_turn_off(self): + async def async_turn_off(self, **kwargs: Any) -> None: """Turn off the ecoforest device.""" await self.entity_description.switch_fn(self.coordinator.api, False) await self.coordinator.async_request_refresh() diff --git a/homeassistant/components/v2c/switch.py b/homeassistant/components/v2c/switch.py index cd89e954275..cca7da70e48 100644 --- a/homeassistant/components/v2c/switch.py +++ b/homeassistant/components/v2c/switch.py @@ -111,12 +111,12 @@ class V2CSwitchEntity(V2CBaseEntity, SwitchEntity): """Return the state of the EVSE switch.""" return self.entity_description.value_fn(self.data) - async def async_turn_on(self): + async def async_turn_on(self, **kwargs: Any) -> None: """Turn on the EVSE switch.""" await self.entity_description.turn_on_fn(self.coordinator.evse) await self.coordinator.async_request_refresh() - async def async_turn_off(self): + async def async_turn_off(self, **kwargs: Any) -> None: """Turn off the EVSE switch.""" await self.entity_description.turn_off_fn(self.coordinator.evse) await self.coordinator.async_request_refresh()