Fix method subtyping [knx] (#134211)

pull/130657/head^2
Marc Mueller 2024-12-29 16:41:23 +01:00 committed by GitHub
parent beb881492a
commit d3fab42c85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -427,7 +427,7 @@ class KNXClimate(KnxYamlEntity, ClimateEntity):
self._device.mode.xknx.devices.async_remove(self._device.mode)
await super().async_will_remove_from_hass()
def after_update_callback(self, _device: XknxDevice) -> None:
def after_update_callback(self, device: XknxDevice) -> None:
"""Call after device was updated."""
if self._device.mode is not None and self._device.mode.supports_controller_mode:
hvac_mode = CONTROLLER_MODES.get(
@ -435,4 +435,4 @@ class KNXClimate(KnxYamlEntity, ClimateEntity):
)
if hvac_mode is not HVACMode.OFF:
self._last_hvac_mode = hvac_mode
super().after_update_callback(_device)
super().after_update_callback(device)

View File

@ -69,7 +69,7 @@ class _KnxEntityBase(Entity):
"""Request a state update from KNX bus."""
await self._device.sync()
def after_update_callback(self, _device: XknxDevice) -> None:
def after_update_callback(self, device: XknxDevice) -> None:
"""Call after device was updated."""
self.async_write_ha_state()

View File

@ -211,7 +211,7 @@ class KNXSystemSensor(SensorEntity):
return True
return self.knx.xknx.connection_manager.state is XknxConnectionState.CONNECTED
def after_update_callback(self, _: XknxConnectionState) -> None:
def after_update_callback(self, device: XknxConnectionState) -> None:
"""Call after device was updated."""
self.async_write_ha_state()