Skip to content

Commit

Permalink
Merge pull request #70 from RobertD502/constants_deprecation_fix
Browse files Browse the repository at this point in the history
Constants deprecation fix
  • Loading branch information
RobertD502 authored Dec 27, 2023
2 parents e2b17af + 4960573 commit fa824fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion custom_components/flair/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"requirements": [
"flairaio==0.1.3"
],
"version": "0.1.10"
"version": "0.1.11"
}
10 changes: 5 additions & 5 deletions custom_components/flair/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit fa824fb

Please sign in to comment.