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" } diff --git a/custom_components/flair/sensor.py b/custom_components/flair/sensor.py index 7fb72ba..37e3df6 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: 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" }