diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt index 7d2e2d0..d92c969 100644 --- a/.github/workflows/constraints.txt +++ b/.github/workflows/constraints.txt @@ -1,5 +1,5 @@ black==23.9.1 -pip==23.2.1 pre-commit==3.5.0 +pip==23.3 flake8==6.1.0 reorder-python-imports==3.12.0 diff --git a/custom_components/hilo/sensor.py b/custom_components/hilo/sensor.py old mode 100644 new mode 100755 index 13f2835..fd1df8e --- a/custom_components/hilo/sensor.py +++ b/custom_components/hilo/sensor.py @@ -243,7 +243,8 @@ class EnergySensor(IntegrationSensor): def __init__(self, device): self._device = device - self._attr_name = f"hilo_energy_{slugify(device.name)}" + self._attr_name = f"Hilo Energy {slugify(device.name)}" + self._attr_unique_id = f"hilo_energy_{slugify(device.name)}" self._unit_of_measurement = ENERGY_WATT_HOUR self._unit_prefix = None if device.type == "Meter":