From 12e0334cec5709b89a06f444d44c9deb5bcf3318 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:02:26 -0500 Subject: [PATCH 1/4] Use UnitOfElectricPotential --- custom_components/flair/sensor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/flair/sensor.py b/custom_components/flair/sensor.py index 7fb72ba..995c2c2 100644 --- a/custom_components/flair/sensor.py +++ b/custom_components/flair/sensor.py @@ -13,10 +13,10 @@ ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import( - ELECTRIC_POTENTIAL_VOLT, LIGHT_LUX, PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, + UnitOfElectricPotential UnitOfPressure, UnitOfTemperature, @@ -458,10 +458,10 @@ def native_value(self) -> float: return self.puck_data.attributes['voltage'] @property - def native_unit_of_measurement(self) -> str: + def native_unit_of_measurement(self) -> UnitOfElectricPotential: """Return volts as the native unit.""" - return ELECTRIC_POTENTIAL_VOLT + return UnitOfElectricPotential.VOLT @property def device_class(self) -> SensorDeviceClass: @@ -861,10 +861,10 @@ def native_value(self) -> float: return self.vent_data.attributes['voltage'] @property - def native_unit_of_measurement(self) -> str: + def native_unit_of_measurement(self) -> UnitOfElectricPotential: """Return volts as the native unit.""" - return ELECTRIC_POTENTIAL_VOLT + return UnitOfElectricPotential.VOLT @property def device_class(self) -> SensorDeviceClass: From 2476927d7e958513f68d66e7585b440d4473b81f Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:04:37 -0500 Subject: [PATCH 2/4] Update sensor.py --- custom_components/flair/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/flair/sensor.py b/custom_components/flair/sensor.py index 995c2c2..37e3df6 100644 --- a/custom_components/flair/sensor.py +++ b/custom_components/flair/sensor.py @@ -16,7 +16,7 @@ LIGHT_LUX, PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, - UnitOfElectricPotential + UnitOfElectricPotential, UnitOfPressure, UnitOfTemperature, From 5cbe9f4029f280dd432c13408b85191ae2e2c25c Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:12:12 -0500 Subject: [PATCH 3/4] bump minimum HA version to 2023.12.0 --- hacs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacs.json b/hacs.json index 3834144..8463b55 100644 --- a/hacs.json +++ b/hacs.json @@ -2,7 +2,7 @@ "name": "Flair", "render_readme": true, "country": "US", - "homeassistant": "2022.11.0b0", + "homeassistant": "2023.12.0", "zip_release": true, "filename": "flair.zip" } From 49605730cc0ff1f488b04209d0123304f8e40ebd Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:13:44 -0500 Subject: [PATCH 4/4] bump integration to 0.1.11 --- custom_components/flair/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/flair/manifest.json b/custom_components/flair/manifest.json index 504c83c..3829b7b 100644 --- a/custom_components/flair/manifest.json +++ b/custom_components/flair/manifest.json @@ -13,5 +13,5 @@ "requirements": [ "flairaio==0.1.3" ], - "version": "0.1.10" + "version": "0.1.11" }