Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
feat: code compatibility with 2023.9 (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgermain authored Sep 8, 2023
1 parent 5784b5f commit 7865aaa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions custom_components/multimatic/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_platform
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from . import SERVICES
Expand Down Expand Up @@ -61,7 +61,7 @@

_LOGGER = logging.getLogger(__name__)

_FUNCTION_TO_HVAC_ACTION: dict[ActiveFunction, str] = {
_FUNCTION_TO_HVAC_ACTION: dict[ActiveFunction, HVACAction] = {
ActiveFunction.COOLING: HVACAction.COOLING,
ActiveFunction.HEATING: HVACAction.HEATING,
ActiveFunction.STANDBY: HVACAction.IDLE,
Expand Down Expand Up @@ -271,7 +271,7 @@ def component(self) -> Room:
return self.coordinator.find_component(self._room_id)

@property
def hvac_mode(self) -> str:
def hvac_mode(self) -> HVACMode:
"""Get the hvac mode based on multimatic mode."""
hvac_mode = RoomClimate._MULTIMATIC_TO_HA[self.active_mode.current][0]
if not hvac_mode:
Expand Down Expand Up @@ -349,7 +349,7 @@ async def async_set_preset_mode(self, preset_mode: str) -> None:
await self.coordinator.api.set_room_operating_mode(self, mode)

@property
def hvac_action(self) -> str | None:
def hvac_action(self) -> HVACAction:
"""Return the current running hvac operation if supported.
Need to be one of CURRENT_HVAC_*.
Expand Down Expand Up @@ -494,7 +494,7 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
await self.coordinator.api.set_zone_operating_mode(self, mode)

@property
def hvac_action(self) -> str | None:
def hvac_action(self) -> HVACAction | None:
"""Return the current running hvac operation if supported.
Need to be one of CURRENT_HVAC_*.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/multimatic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"homekit": {},
"dependencies": [],
"codeowners": ["@thomasgermain"],
"version": "1.14.4",
"version": "1.15.0",
"iot_class": "cloud_polling",
"integration_type": "hub"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "multimatic",
"render_readme": true,
"homeassistant": "2023.6.0"
"homeassistant": "2023.9.0"
}

0 comments on commit 7865aaa

Please sign in to comment.