Improve switch and climate type hints in integrations (#90040)
parent
9092a76dbf
commit
93efdc4991
|
@ -129,7 +129,7 @@ class BSBLANClimate(
|
|||
return PRESET_ECO
|
||||
return PRESET_NONE
|
||||
|
||||
async def async_set_hvac_mode(self, hvac_mode: str) -> None:
|
||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||
"""Set hvac mode."""
|
||||
await self.async_set_data(hvac_mode=hvac_mode)
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ class RachioZone(RachioSwitch):
|
|||
return self._entity_picture
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict[str, Any]:
|
||||
"""Return the optional state attributes."""
|
||||
props = {ATTR_ZONE_NUMBER: self._zone_number, ATTR_ZONE_SUMMARY: self._summary}
|
||||
if self._shade_type:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
import switchbot
|
||||
|
||||
|
@ -61,7 +62,7 @@ class SwitchBotSwitch(SwitchbotSwitchedEntity, SwitchEntity, RestoreEntity):
|
|||
return self._device.is_on()
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict[str, Any]:
|
||||
"""Return the state attributes."""
|
||||
return {
|
||||
**super().extra_state_attributes,
|
||||
|
|
Loading…
Reference in New Issue