Adjust set_hvac_mode type hint in ClimateEntity (#70658)
* Adjust set_hvac_mode type hint in ClimateEntity * Remove override
This commit is contained in:
parent
d22a679262
commit
a75daab33f
2 changed files with 3 additions and 5 deletions
|
@ -463,11 +463,11 @@ class ClimateEntity(Entity):
|
|||
"""Set new target fan mode."""
|
||||
await self.hass.async_add_executor_job(self.set_fan_mode, fan_mode)
|
||||
|
||||
def set_hvac_mode(self, hvac_mode: HVACMode | str) -> None:
|
||||
def set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||
"""Set new target hvac mode."""
|
||||
raise NotImplementedError()
|
||||
|
||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode | str) -> None:
|
||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||
"""Set new target hvac mode."""
|
||||
await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
|
||||
|
||||
|
|
|
@ -98,9 +98,7 @@ class GeniusClimateZone(GeniusHeatingZone, ClimateEntity):
|
|||
return [PRESET_ACTIVITY, PRESET_BOOST]
|
||||
return [PRESET_BOOST]
|
||||
|
||||
async def async_set_hvac_mode( # type:ignore[override]
|
||||
self, hvac_mode: HVACMode
|
||||
) -> None:
|
||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||
"""Set a new hvac mode."""
|
||||
await self._zone.set_mode(HA_HVAC_TO_GH.get(hvac_mode))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue