Skip to content

Commit

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

* Update requirements_test.txt

* Add migration

* Update test_init.py
  • Loading branch information
SukramJ authored Aug 31, 2024
1 parent 115ff65 commit 4ec9ae3
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 20 deletions.
16 changes: 10 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Version 1.65.1 (2024-08-27)

- Bump hahomematic to 2024.8.14
- Add paramset_key to entity_key
- Switch typing of paramset_key from str to ParamsetKey
- Mark only level as relevant entity for DALI
# Version 1.65.1 (2024-08-30)

- Bump hahomematic to 2024.8.15
- Avoid permanent cache save on remove device
- Check rx_mode
- Ensure only one load/save of cache file at time
- Small definition fix for DALI
- Use TypedDict for device_description
- Use TypedDict for parameter_data
- Use select for paramset_key with actions calls
- Use selector for rx_mode in service description

# Version 1.65.0 (2024-08-25)

Expand Down
6 changes: 6 additions & 0 deletions custom_components/homematicip_local/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,11 @@ def del_param(name: str) -> None:
instance_name=entry.data["instance_name"], storage_folder=get_storage_folder(hass=hass)
)
hass.config_entries.async_update_entry(entry, version=5, data=data)
if entry.version == 5:
data = dict(entry.data)
cleanup_cache_dirs(
instance_name=entry.data["instance_name"], storage_folder=get_storage_folder(hass=hass)
)
hass.config_entries.async_update_entry(entry, version=6, data=data)
_LOGGER.info("Migration to version %s successful", entry.version)
return True
2 changes: 1 addition & 1 deletion custom_components/homematicip_local/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async def _async_validate_config_and_get_system_information(
class DomainConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle the instance flow for Homematic(IP) Local."""

VERSION = 5
VERSION = 6
CONNECTION_CLASS = CONN_CLASS_LOCAL_PUSH

def __init__(self) -> None:
Expand Down
1 change: 0 additions & 1 deletion custom_components/homematicip_local/control_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ def _create_central(self) -> CentralUnit:
interface_configs=interface_configs,
start_direct=self._start_direct,
un_ignore_list=self.config.un_ignore,
load_all_paramset_descriptions=True,
).create_central()


Expand Down
4 changes: 2 additions & 2 deletions custom_components/homematicip_local/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/danielperna84/hahomematic/issues",
"loggers": ["hahomematic"],
"requirements": ["hahomematic==2024.8.14"],
"requirements": ["hahomematic==2024.8.15"],
"ssdp": [
{
"manufacturer": "EQ3",
"manufacturerURL": "http://www.homematic.com"
}
],
"version": "1.65.1",
"version": "1.66.0",
"zeroconf": []
}
6 changes: 3 additions & 3 deletions custom_components/homematicip_local/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
BASE_SCHEMA_DEVICE.extend(
{
vol.Optional(CONF_CHANNEL): vol.Coerce(int),
vol.Required(CONF_PARAMSET_KEY): vol.In(["MASTER", "VALUES"]),
vol.Required(CONF_PARAMSET_KEY): vol.All(cv.string, vol.Upper),
}
),
)
Expand Down Expand Up @@ -161,7 +161,7 @@
BASE_SCHEMA_DEVICE.extend(
{
vol.Optional(CONF_CHANNEL): vol.Coerce(int),
vol.Required(CONF_PARAMSET_KEY): vol.In(["MASTER", "VALUES"]),
vol.Required(CONF_PARAMSET_KEY): vol.All(cv.string, vol.Upper),
vol.Required(CONF_PARAMSET): dict,
vol.Optional(CONF_WAIT_FOR_CALLBACK): cv.positive_int,
vol.Optional(CONF_RX_MODE): vol.All(cv.string, vol.Upper),
Expand Down Expand Up @@ -453,7 +453,7 @@ async def _async_service_fetch_system_variables(hass: HomeAssistant, service: Se
async def _async_service_put_paramset(hass: HomeAssistant, service: ServiceCall) -> None:
"""Service to call the putParamset method on a Homematic(IP) Local connection."""
channel_no = service.data.get(CONF_CHANNEL)
paramset_key = ParamsetKey(service.data[CONF_PARAMSET_KEY])
paramset_key = service.data[CONF_PARAMSET_KEY]
# When passing in the paramset from a YAML file we get an OrderedDict
# here instead of a dict, so add this explicit cast.
# The service schema makes sure that this cast works.
Expand Down
10 changes: 8 additions & 2 deletions custom_components/homematicip_local/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ set_device_value:
rx_mode:
example: BURST
selector:
text:
select:
options:
- "BURST"
- "WAKEUP"

set_install_mode:
fields:
Expand Down Expand Up @@ -218,7 +221,10 @@ put_paramset:
rx_mode:
example: BURST
selector:
text:
select:
options:
- "BURST"
- "WAKEUP"

enable_away_mode_by_calendar:
target:
Expand Down
6 changes: 3 additions & 3 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
-r requirements_test_pre_commit.txt

async-upnp-client==0.40.0
hahomematic==2024.8.14
homeassistant==2024.8.3
hahomematic==2024.8.15
homeassistant==2024.9.0b1
mypy==1.11.2
mypy-dev==1.11.0a9
pre-commit==3.8.0
pydevccu==0.1.8
pylint==3.2.6
pytest-homeassistant-custom-component==0.13.155
pytest-homeassistant-custom-component==0.13.157
2 changes: 1 addition & 1 deletion requirements_test_pre_commit.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bandit==1.7.9
codespell==2.3.0
ruff==0.6.2
ruff==0.6.3
yamllint==1.35.1
2 changes: 1 addition & 1 deletion tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def test_migrate_entry(
assert len(config_entries) == 1
config_entry = config_entries[0]
assert config_entry.state == ConfigEntryState.LOADED
assert config_entry.version == 5
assert config_entry.version == 6
assert config_entry.data[CONF_ADVANCED_CONFIG] == {
"enable_system_notifications": True,
"sysvar_scan_enabled": False,
Expand Down

0 comments on commit 4ec9ae3

Please sign in to comment.