From 27ac679e9062ae3a63f02a2c175c0cd14391f7de Mon Sep 17 00:00:00 2001 From: snaky69 <108159253+ic-dev21@users.noreply.github.com> Date: Mon, 4 Mar 2024 21:45:21 -0500 Subject: [PATCH 1/2] Device tarif sensor hotfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quickfix pour les energymeters _low et _medium des devices. En voulant différencier le unique id du nom je pense avoir causé un bug qui fait que leurs valeurs n'était plus populée car la source était érronée. --- custom_components/hilo/manifest.json | 2 +- custom_components/hilo/sensor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/hilo/manifest.json b/custom_components/hilo/manifest.json index 60d9cdc..3de654f 100755 --- a/custom_components/hilo/manifest.json +++ b/custom_components/hilo/manifest.json @@ -11,6 +11,6 @@ "documentation": "https://github.com/dvd-dev/hilo", "iot_class": "cloud_push", "issue_tracker": "https://github.com/dvd-dev/hilo/issues", - "requirements": ["python-hilo>=2024.3.1"], + "requirements": ["python-hilo>=2024.3.2"], "version": "2024.3.1" } diff --git a/custom_components/hilo/sensor.py b/custom_components/hilo/sensor.py index 07ccfb4..574b760 100755 --- a/custom_components/hilo/sensor.py +++ b/custom_components/hilo/sensor.py @@ -146,7 +146,7 @@ async def async_setup_entry( def create_energy_entity(hilo, device): device._energy_entity = EnergySensor(hilo, device) new_entities.append(device._energy_entity) - energy_entity = f"hilo_energy_{slugify(device.name)}" + energy_entity = f"{slugify(device.name)}_hilo_energy" if energy_entity == HILO_ENERGY_TOTAL: LOG.error( "An hilo entity can't be named 'total' because it conflicts " From 04e69c401a5a26e0a57bf3c7e512c5d8ed737cdb Mon Sep 17 00:00:00 2001 From: snaky69 <108159253+ic-dev21@users.noreply.github.com> Date: Wed, 6 Mar 2024 20:54:36 -0500 Subject: [PATCH 2/2] Update manifest.json Typo --- custom_components/hilo/manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/hilo/manifest.json b/custom_components/hilo/manifest.json index 3de654f..ec4cb07 100755 --- a/custom_components/hilo/manifest.json +++ b/custom_components/hilo/manifest.json @@ -11,6 +11,6 @@ "documentation": "https://github.com/dvd-dev/hilo", "iot_class": "cloud_push", "issue_tracker": "https://github.com/dvd-dev/hilo/issues", - "requirements": ["python-hilo>=2024.3.2"], - "version": "2024.3.1" + "requirements": ["python-hilo>=2024.3.1"], + "version": "2024.3.2" }