From 17999172b3d8ff46168c7bee855225cd6ac33afd Mon Sep 17 00:00:00 2001 From: Jason Madigan Date: Fri, 26 Jul 2024 16:35:16 +0100 Subject: [PATCH] bugfix: 400 on panel status --- custom_components/hkc_alarm/alarm_control_panel.py | 2 +- custom_components/hkc_alarm/manifest.json | 2 +- custom_components/hkc_alarm/sensor.py | 2 +- requirements_dev.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/hkc_alarm/alarm_control_panel.py b/custom_components/hkc_alarm/alarm_control_panel.py index 67aa035..d0cf48c 100644 --- a/custom_components/hkc_alarm/alarm_control_panel.py +++ b/custom_components/hkc_alarm/alarm_control_panel.py @@ -42,7 +42,7 @@ def __init__(self, data, device_info, coordinator): @property def unique_id(self): """Return the unique ID of the sensor.""" - return self._hkc_alarm.panel_id + "panel" + return str(self._hkc_alarm.panel_id) + "panel" @property def extra_state_attributes(self): diff --git a/custom_components/hkc_alarm/manifest.json b/custom_components/hkc_alarm/manifest.json index 3ece9bf..d5ec96a 100644 --- a/custom_components/hkc_alarm/manifest.json +++ b/custom_components/hkc_alarm/manifest.json @@ -9,7 +9,7 @@ "@jasonmadigan" ], "requirements": [ - "pyhkc==0.4.8" + "pyhkc==0.4.9" ], "config_flow": true, "iot_class": "cloud_polling" diff --git a/custom_components/hkc_alarm/sensor.py b/custom_components/hkc_alarm/sensor.py index 4a31f4b..1ab74ac 100644 --- a/custom_components/hkc_alarm/sensor.py +++ b/custom_components/hkc_alarm/sensor.py @@ -39,7 +39,7 @@ def extra_state_attributes(self): @property def unique_id(self): """Return the unique ID of the sensor.""" - return self._hkc_alarm.panel_id + str(self._input_data["inputId"]) + return str(self._hkc_alarm.panel_id) + str(self._input_data["inputId"]) @property def device_info(self): diff --git a/requirements_dev.txt b/requirements_dev.txt index 8a3b9ba..0303e50 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -3,4 +3,4 @@ homeassistant==2024.6.4 pytest pytest-homeassistant-custom-component==0.13.136 pytest-aiohttp -pyhkc==0.4.8 +pyhkc==0.4.9