Skip to content

Commit

Permalink
Add support for HmIP-WKP (#481)
Browse files Browse the repository at this point in the history
* Bump hahomematic to 2023.7.2

* Add entity descriptions and translations for HmIP-WKP
  • Loading branch information
SukramJ committed Jul 12, 2023
1 parent c94803e commit ded84fa
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 9 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

- Bump hahomematic to 2023.7.1
- Log an error about the ping/pong count mismatch
- Bump hahomematic to 2023.7.2
- Add new Events PRESS_LOCK and PRESS_UNLOCK for HmIP-WKP
- Add entity descriptions and translations for HmIP-WKP

# Version 1.39.0 (2023-07-07)

Expand Down
19 changes: 18 additions & 1 deletion custom_components/homematicip_local/entity_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
),
"CODE_ID": HmSensorEntityDescription(
key="CODE_ID",
),
"CONCENTRATION": HmSensorEntityDescription(
key="CONCENTRATION",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
Expand Down Expand Up @@ -356,6 +359,14 @@
_SENSOR_DESCRIPTIONS_BY_DEVICE_AND_PARAM: dict[
tuple[str | tuple[str, ...], str], EntityDescription
] = {
(
"HmIP-WKP",
"CODE_STATE",
): HmSensorEntityDescription(
key="WKP_CODE_STATE",
device_class=SensorDeviceClass.ENUM,
translation_key="wkp_code_state",
),
(
("HmIP-SRH", "HM-Sec-RHS", "HM-Sec-xx", "ZEL STG RM FDK"),
"STATE",
Expand Down Expand Up @@ -455,6 +466,12 @@
key="ACOUSTIC_ALARM_ACTIVE",
device_class=BinarySensorDeviceClass.SAFETY,
),
("BLOCKED_PERMANENT", "BLOCKED_TEMPORARY"): HmBinarySensorEntityDescription(
key="BLOCKED",
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
"BURST_LIMIT_WARNING": HmBinarySensorEntityDescription(
key="BURST_LIMIT_WARNING",
device_class=BinarySensorDeviceClass.PROBLEM,
Expand Down Expand Up @@ -519,7 +536,7 @@
key="RAINING",
device_class=BinarySensorDeviceClass.MOISTURE,
),
"SABOTAGE": HmBinarySensorEntityDescription(
("SABOTAGE", "SABOTAGE_STICKY"): HmBinarySensorEntityDescription(
key="SABOTAGE",
device_class=BinarySensorDeviceClass.TAMPER,
entity_category=EntityCategory.DIAGNOSTIC,
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/danielperna84/hahomematic/issues",
"loggers": ["hahomematic"],
"requirements": ["hahomematic==2023.7.1"],
"requirements": ["hahomematic==2023.7.2"],
"ssdp": [
{
"manufacturer": "EQ3",
Expand Down
46 changes: 43 additions & 3 deletions custom_components/homematicip_local/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
"trigger_type": {
"press": "Button \"{subtype}\" pressed",
"press_cont": "Button \"{subtype}\" continuously pressed",
"press_lock": "Lock button \"{subtype}\" pressed",
"press_long": "Button \"{subtype}\" long pressed",
"press_long_release": "Button \"{subtype}\" long press released",
"press_long_start": "Button \"{subtype}\" started long press",
"press_short": "Button \"{subtype}\" pressed"
"press_short": "Button \"{subtype}\" pressed",
"press_unlock": "Unlock button \"{subtype}\" pressed"
}
},
"entity": {
Expand All @@ -63,8 +65,11 @@
"alarmstate": {
"name": "Alarmstate"
},
"burst_limit_warning": {
"name": "Burst Limit Warning"
"blocked_permanent": {
"name": "Blocked permanent"
},
"blocked_temporary": {
"name": "Blocked temporary"
},
"current_passage_direction": {
"name": "Passage Direction"
Expand Down Expand Up @@ -126,9 +131,36 @@
"sabotage": {
"name": "Sabotage"
},
"sabotage_sticky": {
"name": "Sabotage sticky"
},
"state": {
"name": ""
},
"user_authorization_01": {
"name": "User authorization 1"
},
"user_authorization_02": {
"name": "User authorization 2"
},
"user_authorization_03": {
"name": "User authorization 3"
},
"user_authorization_04": {
"name": "User authorization 4"
},
"user_authorization_05": {
"name": "User authorization 5"
},
"user_authorization_06": {
"name": "User authorization 6"
},
"user_authorization_07": {
"name": "User authorization 7"
},
"user_authorization_08": {
"name": "User authorization 8"
},
"waterlevel_detected": {
"name": "Waterlevel Detected"
},
Expand Down Expand Up @@ -428,6 +460,14 @@
},
"wind_speed": {
"name": "Wind Speed"
},
"wkp_code_state": {
"name": "Code Status",
"state": {
"idle": "idle",
"known_code_id_received": "known code id received",
"unknown_code_detected": "unknown code detected"
}
}
},
"switch": {
Expand Down
45 changes: 44 additions & 1 deletion custom_components/homematicip_local/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
"trigger_type": {
"press": "Taster \"{subtype}\" wurde gedrückt",
"press_cont": "Taster \"{subtype}\" wird dauerhaft gedrückt",
"press_lock": "Sperrtaster \"{subtype}\" wurde gedrückt",
"press_long": "Taster \"{subtype}\" wurde lange gedrückt",
"press_long_release": "Taster \"{subtype}\" wurde nach langem Tastendruck los gelassen",
"press_long_start": "Taster \"{subtype}\" hat langen Tastendruck gestartet",
"press_short": "Taster \"{subtype}\" wurde gedrückt"
"press_short": "Taster \"{subtype}\" wurde gedrückt",
"press_unlock": "Entsperrtaster \"{subtype}\" wurde gedrückt"
}
},
"entity": {
Expand All @@ -63,6 +65,12 @@
"alarmstate": {
"name": "Alarmzustand"
},
"blocked_permanent": {
"name": "Dauerhaft gesperrt"
},
"blocked_temporary": {
"name": "Vorübergehend gesperrt"
},
"burst_limit_warning": {
"name": "Burst-Limit-Warnung"
},
Expand Down Expand Up @@ -126,9 +134,36 @@
"sabotage": {
"name": "Sabotage"
},
"sabotage_sticky": {
"name": "Sabotage festgesetzt"
},
"state": {
"name": ""
},
"user_authorization_01": {
"name": "Benutzerautorisierung 1"
},
"user_authorization_02": {
"name": "Benutzerautorisierung 2"
},
"user_authorization_03": {
"name": "Benutzerautorisierung 3"
},
"user_authorization_04": {
"name": "Benutzerautorisierung 4"
},
"user_authorization_05": {
"name": "Benutzerautorisierung 5"
},
"user_authorization_06": {
"name": "Benutzerautorisierung 6"
},
"user_authorization_07": {
"name": "Benutzerautorisierung 7"
},
"user_authorization_08": {
"name": "Benutzerautorisierung 8"
},
"waterlevel_detected": {
"name": "Wasserstand erkannt"
},
Expand Down Expand Up @@ -428,6 +463,14 @@
},
"wind_speed": {
"name": "Windgeschwindigkeit"
},
"wkp_code_state": {
"name": "Code Status",
"state": {
"idle": "Leerlauf",
"known_code_id_received": "Bekannte Code-ID erhalten",
"unknown_code_detected": "Unbekannter Code erkannt"
}
}
},
"switch": {
Expand Down
46 changes: 43 additions & 3 deletions custom_components/homematicip_local/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
"trigger_type": {
"press": "Button \"{subtype}\" pressed",
"press_cont": "Button \"{subtype}\" continuously pressed",
"press_lock": "Lock button \"{subtype}\" pressed",
"press_long": "Button \"{subtype}\" long pressed",
"press_long_release": "Button \"{subtype}\" long press released",
"press_long_start": "Button \"{subtype}\" started long press",
"press_short": "Button \"{subtype}\" pressed"
"press_short": "Button \"{subtype}\" pressed",
"press_unlock": "Unlock button \"{subtype}\" pressed"
}
},
"entity": {
Expand All @@ -63,8 +65,11 @@
"alarmstate": {
"name": "Alarmstate"
},
"burst_limit_warning": {
"name": "Burst Limit Warning"
"blocked_permanent": {
"name": "Blocked permanent"
},
"blocked_temporary": {
"name": "Blocked temporary"
},
"current_passage_direction": {
"name": "Passage Direction"
Expand Down Expand Up @@ -126,9 +131,36 @@
"sabotage": {
"name": "Sabotage"
},
"sabotage_sticky": {
"name": "Sabotage sticky"
},
"state": {
"name": ""
},
"user_authorization_01": {
"name": "User authorization 1"
},
"user_authorization_02": {
"name": "User authorization 2"
},
"user_authorization_03": {
"name": "User authorization 3"
},
"user_authorization_04": {
"name": "User authorization 4"
},
"user_authorization_05": {
"name": "User authorization 5"
},
"user_authorization_06": {
"name": "User authorization 6"
},
"user_authorization_07": {
"name": "User authorization 7"
},
"user_authorization_08": {
"name": "User authorization 8"
},
"waterlevel_detected": {
"name": "Waterlevel Detected"
},
Expand Down Expand Up @@ -199,6 +231,14 @@
"carrier_sense_level": {
"name": "Carrier Sense Level"
},
"code_state": {
"name": "Code Status",
"state": {
"idle": "idle",
"known_code_id_received": "known code id received",
"unknown_code_detected": "unknown code detected"
}
},
"color": {
"name": "Color"
},
Expand Down

0 comments on commit ded84fa

Please sign in to comment.