From 303a0e9183688f467680e3197e1b488f4479a222 Mon Sep 17 00:00:00 2001 From: Ernst Klamer Date: Sat, 6 Jul 2024 12:57:02 +0200 Subject: [PATCH 1/2] fix conductivity warning --- custom_components/ble_monitor/const.py | 13 +++++++------ custom_components/ble_monitor/manifest.json | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/custom_components/ble_monitor/const.py b/custom_components/ble_monitor/const.py index 2610685b..61dda63d 100755 --- a/custom_components/ble_monitor/const.py +++ b/custom_components/ble_monitor/const.py @@ -10,12 +10,13 @@ SensorStateClass) from homeassistant.const import (CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER, - CONCENTRATION_PARTS_PER_MILLION, CONDUCTIVITY, - LIGHT_LUX, PERCENTAGE, + CONCENTRATION_PARTS_PER_MILLION, LIGHT_LUX, + PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, Platform, - UnitOfElectricPotential, UnitOfEnergy, - UnitOfMass, UnitOfPower, UnitOfPressure, - UnitOfTemperature, UnitOfVolume) + UnitOfConductivity, UnitOfElectricPotential, + UnitOfEnergy, UnitOfMass, UnitOfPower, + UnitOfPressure, UnitOfTemperature, + UnitOfVolume) from homeassistant.helpers.entity import EntityCategory DOMAIN = "ble_monitor" @@ -829,7 +830,7 @@ class BLEMonitorBinarySensorEntityDescription( name="ble conductivity", unique_id="c_", icon="mdi:lightning-bolt-circle", - native_unit_of_measurement=CONDUCTIVITY, + native_unit_of_measurement=UnitOfConductivity.MICROSIEMENS, device_class=None, suggested_display_precision=0, state_class=SensorStateClass.MEASUREMENT, diff --git a/custom_components/ble_monitor/manifest.json b/custom_components/ble_monitor/manifest.json index becb00c0..01fed043 100644 --- a/custom_components/ble_monitor/manifest.json +++ b/custom_components/ble_monitor/manifest.json @@ -14,5 +14,5 @@ "btsocket>=0.2.0", "pyric>=0.1.6.3" ], - "version": "12.12.1" + "version": "12.12.2" } From 7573ee3278c8e926f877caa3cb057a66fca375a4 Mon Sep 17 00:00:00 2001 From: Ernst Klamer Date: Sat, 6 Jul 2024 13:00:53 +0200 Subject: [PATCH 2/2] bump pytest-homeassistant-custom-component --- hacs.json | 2 +- requirements_test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hacs.json b/hacs.json index 69b0c533..92446aa3 100644 --- a/hacs.json +++ b/hacs.json @@ -1,4 +1,4 @@ { "name": "Passive BLE monitor integration", - "homeassistant": "2024.4.0" + "homeassistant": "2024.7.0" } diff --git a/requirements_test.txt b/requirements_test.txt index ce4b33f0..b2ec599c 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,4 +1,4 @@ -pytest-homeassistant-custom-component==0.13.133 +pytest-homeassistant-custom-component==0.13.145 # BLE montitor requirements pycryptodomex==3.19.1