Skip to content

Commit

Permalink
Bump hahomematic to 2024.9.6 (#723)
Browse files Browse the repository at this point in the history
* Bump hahomematic to 2024.9.6

* Fix
  • Loading branch information
SukramJ authored Sep 13, 2024
1 parent 638d0f0 commit 2dd9f50
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 33 deletions.
9 changes: 6 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
- Use service get_link_paramset to read direct connections

## What's Changed
- Bump hahomematic to 2024.9.5
- Bump hahomematic to 2024.9.6
- Add check for link paramsets
- Add getLinkPeers XmlRPC method
- Add missing PayloadMixin
- Add paramset_key to entity_key
- Adjust payload and path
- Avoid permanent cache save on remove device
- Check rx_mode
- Do not create update entities that are not updatable (manually remove obsolete update entities)
Expand All @@ -18,16 +20,17 @@
- Mark only level as relevant entity for DALI
- Only try device update refresh if device is updatable
- Refactor update entity
- Rename value_property to state_property
- Small definition fix for DALI
- Switch typing of paramset_key from str to ParamsetKey
- Use TypedDict for device_description
- Use TypedDict for parameter_data
- Use validator for local schema
- Add services get_link_peers, get_link_paramset, put_link_paramset
- Improve german descriptions by @baxxy13
- Use domain alias
- Use select for paramset_key with actions calls
- Use selector for rx_mode in service description
- Use domain alias
- Improve german descriptions by @baxxy13

# Version 1.65.0 (2024-08-25)

Expand Down
1 change: 0 additions & 1 deletion custom_components/homematicip_local/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class HmEntityType(StrEnum):
CUSTOM = "custom"



BLOCK_PLATFORMS: Final[tuple[str, ...]] = ()


Expand Down
26 changes: 13 additions & 13 deletions custom_components/homematicip_local/control_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ def device_info(self) -> DeviceInfo | None:
def _create_central(self) -> CentralUnit:
"""Create the central unit for ccu callbacks."""
interface_configs: set[InterfaceConfig] = set()
for interface_name in self.config.interface_config:
interface = self.config.interface_config[interface_name]
for interface_name in self._config.interface_config:
interface = self._config.interface_config[interface_name]
interface_configs.add(
InterfaceConfig(
central_name=self._instance_name,
Expand All @@ -183,24 +183,24 @@ def _create_central(self) -> CentralUnit:
return CentralConfig(
name=self._instance_name,
storage_folder=get_storage_folder(self._hass),
host=self.config.host,
username=self.config.username,
password=self.config.password,
host=self._config.host,
username=self._config.username,
password=self._config.password,
central_id=central_id,
tls=self.config.tls,
verify_tls=self.config.verify_tls,
tls=self._config.tls,
verify_tls=self._config.verify_tls,
client_session=aiohttp_client.async_get_clientsession(self._hass),
json_port=self.config.json_port,
callback_host=self.config.callback_host
if self.config.callback_host != IP_ANY_V4
json_port=self._config.json_port,
callback_host=self._config.callback_host
if self._config.callback_host != IP_ANY_V4
else None,
callback_port=self.config.callback_port
if self.config.callback_port != PORT_ANY
callback_port=self._config.callback_port
if self._config.callback_port != PORT_ANY
else None,
default_callback_port=self._default_callback_port,
interface_configs=interface_configs,
start_direct=self._start_direct,
un_ignore_list=self.config.un_ignore,
un_ignore_list=self._config.un_ignore,
).create_central()


Expand Down
25 changes: 13 additions & 12 deletions custom_components/homematicip_local/entity_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,31 @@

from collections.abc import Mapping
import dataclasses
import logging
from dataclasses import dataclass
from typing import Final
from enum import StrEnum
import logging
from typing import Final

from hahomematic.const import HmPlatform
from hahomematic.platforms.custom.entity import CustomEntity
from hahomematic.platforms.generic.entity import GenericEntity
from hahomematic.platforms.hub.entity import GenericHubEntity
from hahomematic.support import element_matches_key

from homeassistant.components.binary_sensor import BinarySensorDeviceClass, BinarySensorEntityDescription
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntityDescription,
)
from homeassistant.components.button import ButtonEntityDescription
from homeassistant.components.cover import CoverDeviceClass, CoverEntityDescription
from homeassistant.components.lock import LockEntityDescription
from homeassistant.components.number import NumberDeviceClass, NumberEntityDescription
from homeassistant.components.select import SelectEntityDescription
from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass, SensorEntityDescription
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.components.siren import SirenEntityDescription
from homeassistant.components.switch import SwitchDeviceClass, SwitchEntityDescription
from homeassistant.const import (
Expand All @@ -48,9 +55,7 @@
from homeassistant.helpers.entity import EntityDescription
from homeassistant.helpers.typing import UNDEFINED, UndefinedType

from .support import (
HmGenericEntity,
)
from .support import HmGenericEntity

_LOGGER = logging.getLogger(__name__)

Expand All @@ -66,6 +71,7 @@ class HmNameSource(StrEnum):
ENTITY_NAME = "entity_name"
PARAMETER = "parameter"


@dataclass(frozen=True, kw_only=True)
class HmEntityDescription:
"""Base class describing Homematic(IP) Local entities."""
Expand Down Expand Up @@ -136,7 +142,6 @@ class HmButtonEntityDescription(HmEntityDescription, ButtonEntityDescription):
}



_SELECT_DESCRIPTIONS_BY_PARAM: Mapping[str | tuple[str, ...], EntityDescription] = {
"HEATING_COOLING": HmSelectEntityDescription(
key="HEATING_COOLING",
Expand All @@ -147,8 +152,6 @@ class HmButtonEntityDescription(HmEntityDescription, ButtonEntityDescription):
}




_SENSOR_DESCRIPTIONS_BY_PARAM: Mapping[str | tuple[str, ...], EntityDescription] = {
"AIR_PRESSURE": HmSensorEntityDescription(
key="AIR_PRESSURE",
Expand Down Expand Up @@ -564,7 +567,6 @@ class HmButtonEntityDescription(HmEntityDescription, ButtonEntityDescription):
}



_BINARY_SENSOR_DESCRIPTIONS_BY_PARAM: Mapping[str | tuple[str, ...], EntityDescription] = {
"ALARMSTATE": HmBinarySensorEntityDescription(
key="ALARMSTATE",
Expand Down Expand Up @@ -975,4 +977,3 @@ def _param_in_list(params: str | tuple[str, ...], parameter: str) -> bool:
if parameter.lower() == device.lower():
return True
return False

2 changes: 1 addition & 1 deletion custom_components/homematicip_local/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/danielperna84/hahomematic/issues",
"loggers": ["hahomematic"],
"requirements": ["hahomematic==2024.9.5"],
"requirements": ["hahomematic==2024.9.6"],
"ssdp": [
{
"manufacturer": "EQ3",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/homematicip_local/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
from . import HomematicConfigEntry
from .const import HmEntityState
from .control_unit import ControlUnit, signal_new_hm_entity
from .entity_helpers import HmNumberEntityDescription
from .generic_entity import (
ATTR_VALUE_STATE,
HaHomematicGenericEntity,
HaHomematicGenericSysvarEntity,
)
from .entity_helpers import HmNumberEntityDescription

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/homematicip_local/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
from . import HomematicConfigEntry
from .const import TOTAL_SYSVAR, HmEntityState
from .control_unit import ControlUnit, signal_new_hm_entity
from .entity_helpers import HmSensorEntityDescription
from .generic_entity import (
ATTR_VALUE_STATE,
HaHomematicGenericEntity,
HaHomematicGenericSysvarEntity,
)
from .entity_helpers import HmSensorEntityDescription

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r requirements_test_pre_commit.txt

async-upnp-client==0.40.0
hahomematic==2024.9.5
hahomematic==2024.9.6
homeassistant==2024.9.1
mypy==1.11.2
mypy-dev==1.11.0a9
Expand Down

0 comments on commit 2dd9f50

Please sign in to comment.