Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove action set_install_mode #788

Merged
merged 2 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,6 @@ __Disclaimer: To much writing to the device MASTER paramset could kill your devi

Set a device parameter via the XML-RPC interface. Preferred when using the UI. Works with device selection.

### `homematicip_local.set_install_mode`

Turn on the install mode on the provided Interface to pair new devices.

### `homematicip_local.set_schedule_profile`

__Disclaimer: To much writing to the device could kill your device's storage.__
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Version 1.77.0 (2024-12-29)

- Bump hahomematic to 2025.1.0
- Remove get-/set_install_mode
- Add switch to toggle the state of CCU programs
- Remove action set_install_mode

# Version 1.76.1 (2024-12-27)

Expand Down
3 changes: 1 addition & 2 deletions custom_components/homematicip_local/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DOMAIN: Final = "homematicip_local"
HMIP_LOCAL_MIN_HA_VERSION: Final = "2024.12.0"
ENABLE_EXPERIMENTAL_FEATURES: Final = False
HMIP_LOCAL_HAHOMEMATIC_VERSION: Final = "2024.12.13"
HMIP_LOCAL_HAHOMEMATIC_VERSION: Final = "2025.1.0"

DEFAULT_ENABLE_DEVICE_FIRMWARE_CHECK: Final = True
DEFAULT_ENABLE_SYSTEM_NOTIFICATIONS: Final = True
Expand Down Expand Up @@ -82,7 +82,6 @@ class HmipLocalServices(StrEnum):
REMOVE_CENTRAL_LINKS = "remove_central_links"
SET_COVER_COMBINED_POSITION = "set_cover_combined_position"
SET_DEVICE_VALUE = "set_device_value"
SET_INSTALL_MODE = "set_install_mode"
SET_SCHEDULE_PROFILE = "set_schedule_profile"
SET_SCHEDULE_PROFILE_WEEKDAY = "set_schedule_profile_weekday"
SET_SCHEDULE_SIMPLE_PROFILE = "set_schedule_simple_profile"
Expand Down
1 change: 0 additions & 1 deletion custom_components/homematicip_local/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"remove_central_links": "mdi:link",
"set_cover_combined_position": "mdi:blinds-horizontal",
"set_device_value": "mdi:content-save",
"set_install_mode": "mdi:plus",
"set_schedule_profile": "mdi:calendar",
"set_schedule_profile_weekday": "mdi:calendar",
"set_schedule_simple_profile": "mdi:calendar",
Expand Down
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/sukramj/hahomematic/issues",
"loggers": ["hahomematic"],
"requirements": ["hahomematic==2024.12.13"],
"requirements": ["hahomematic==2025.1.0"],
"ssdp": [
{
"manufacturer": "EQ3",
Expand Down
32 changes: 1 addition & 31 deletions custom_components/homematicip_local/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import voluptuous as vol

from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import CONF_DEVICE_ID, CONF_MODE
from homeassistant.const import CONF_DEVICE_ID
from homeassistant.core import HomeAssistant, ServiceCall, ServiceResponse, SupportsResponse, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import device_registry as dr
Expand Down Expand Up @@ -158,15 +158,6 @@
}
)

SCHEMA_SET_INSTALL_MODE = vol.Schema(
{
vol.Required(CONF_INTERFACE_ID): cv.string,
vol.Optional(CONF_TIME, default=60): cv.positive_int,
vol.Optional(CONF_MODE, default=1): vol.All(vol.Coerce(int), vol.In([1, 2])),
vol.Optional(CONF_ADDRESS): haval.device_address,
}
)

SCHEMA_SET_DEVICE_VALUE = vol.All(
cv.has_at_least_one_key(CONF_DEVICE_ID, CONF_DEVICE_ADDRESS),
cv.has_at_most_one_key(CONF_DEVICE_ID, CONF_DEVICE_ADDRESS),
Expand Down Expand Up @@ -246,8 +237,6 @@ async def async_call_hmip_local_service(service: ServiceCall) -> ServiceResponse
await _async_service_put_paramset(hass=hass, service=service)
elif service_name == HmipLocalServices.REMOVE_CENTRAL_LINKS:
await _async_service_remove_central_link(hass=hass, service=service)
elif service_name == HmipLocalServices.SET_INSTALL_MODE:
await _async_service_set_install_mode(hass=hass, service=service)
elif service_name == HmipLocalServices.SET_DEVICE_VALUE:
await _async_service_set_device_value(hass=hass, service=service)
elif service_name == HmipLocalServices.SET_VARIABLE_VALUE:
Expand Down Expand Up @@ -358,14 +347,6 @@ async def async_call_hmip_local_service(service: ServiceCall) -> ServiceResponse
schema=SCHEMA_SET_DEVICE_VALUE,
)

async_register_admin_service(
hass=hass,
domain=DOMAIN,
service=HmipLocalServices.SET_INSTALL_MODE,
service_func=async_call_hmip_local_service,
schema=SCHEMA_SET_INSTALL_MODE,
)

hass.services.async_register(
domain=DOMAIN,
service=HmipLocalServices.PUT_LINK_PARAMSET,
Expand Down Expand Up @@ -584,17 +565,6 @@ async def _async_service_set_variable_value(hass: HomeAssistant, service: Servic
await control.central.set_system_variable(name=name, value=value)


async def _async_service_set_install_mode(hass: HomeAssistant, service: ServiceCall) -> None:
"""Service to set interface_id into install mode."""
interface_id = service.data[CONF_INTERFACE_ID]
mode: int = service.data.get(CONF_MODE, 1)
time: int = service.data.get(CONF_TIME, 60)
device_address = service.data.get(CONF_ADDRESS)

if control_unit := _async_get_cu_by_interface_id(hass=hass, interface_id=interface_id):
await control_unit.central.set_install_mode(interface_id, t=time, mode=mode, device_address=device_address)


async def _async_service_clear_cache(hass: HomeAssistant, service: ServiceCall) -> None:
"""Service to clear the cache."""
entry_id = service.data[CONF_ENTRY_ID]
Expand Down
25 changes: 0 additions & 25 deletions custom_components/homematicip_local/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,31 +464,6 @@ set_device_value:
- "BURST"
- "WAKEUP"

set_install_mode:
fields:
interface_id:
required: true
example: Interfaces name from config
selector:
text:
mode:
default: 1
selector:
number:
min: 1
max: 2
time:
default: 60
selector:
number:
min: 1
max: 3600
unit_of_measurement: seconds
address:
example: LEQ3948571
selector:
text:

put_link_paramset:
fields:
sender_channel_address:
Expand Down
22 changes: 0 additions & 22 deletions custom_components/homematicip_local/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,28 +1052,6 @@
},
"name": "Set device value"
},
"set_install_mode": {
"description": "Set a RPC XML interface into installation mode",
"fields": {
"address": {
"description": "Address of homematic device or BidCoS-RF to learn",
"name": "Address"
},
"interface_id": {
"description": "Select the given interface into install mode",
"name": "Interface"
},
"mode": {
"description": "1= Normal mode / 2= Remove exists old links",
"name": "Mode"
},
"time": {
"description": "Time to run in install mode",
"name": "Time"
}
},
"name": "Set install mode"
},
"set_schedule_profile": {
"description": "Call to store a schedule on a climate device",
"fields": {
Expand Down
22 changes: 0 additions & 22 deletions custom_components/homematicip_local/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1050,28 +1050,6 @@
},
"name": "Wert eines Geräteparameters schreiben"
},
"set_install_mode": {
"description": "Aktiviert den Anlernmodus auf der Zentrale über die XML-RPC-Schnittstelle",
"fields": {
"address": {
"description": "Adresse des Homematic-Gerätes zum anlernen",
"name": "Adresse"
},
"interface_id": {
"description": "Wählen Sie die Schnittstelle für den Installationsmodus aus",
"name": "Schnittstelle"
},
"mode": {
"description": "1= Normaler Modus / 2= Entfernt die vorhandenen alten Links",
"name": "Modus"
},
"time": {
"description": "Dauer für die Ausführung im Installationsmodus",
"name": "Dauer"
}
},
"name": "Anlernmodus auf der Homematic-Zentrale aktivieren"
},
"set_schedule_profile": {
"description": "Speichert einen Zeitplan auf einem Thermostat",
"fields": {
Expand Down
22 changes: 0 additions & 22 deletions custom_components/homematicip_local/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,28 +1052,6 @@
},
"name": "Set device value"
},
"set_install_mode": {
"description": "Set a RPC XML interface into installation mode",
"fields": {
"address": {
"description": "Address of homematic device or BidCoS-RF to learn",
"name": "Address"
},
"interface_id": {
"description": "Select the given interface into install mode",
"name": "Interface"
},
"mode": {
"description": "1= Normal mode / 2= Remove exists old links",
"name": "Mode"
},
"time": {
"description": "Time to run in install mode",
"name": "Time"
}
},
"name": "Set install mode"
},
"set_schedule_profile": {
"description": "Call to store a schedule on a climate device",
"fields": {
Expand Down
6 changes: 3 additions & 3 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-r requirements_test_pre_commit.txt

async-upnp-client==0.42.0
hahomematic==2024.12.13
homeassistant==2025.1.0b3
hahomematic==2025.1.0
homeassistant==2025.1.0b5
isal==1.7.1
mypy-dev==1.14.0a7
pre-commit==4.0.1
pur==7.3.3
pydevccu==0.1.9
pylint==3.3.3
pylint_strict_informational==0.1
pytest-homeassistant-custom-component==0.13.197
pytest-homeassistant-custom-component==0.13.199
Loading