diff --git a/custom_components/purrsong/manifest.json b/custom_components/purrsong/manifest.json index 581d18d..a8f1fca 100644 --- a/custom_components/purrsong/manifest.json +++ b/custom_components/purrsong/manifest.json @@ -9,5 +9,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/RobertD502/home-assistant-lavviebot/issues", "requirements": ["lavviebotaio==0.2.0"], - "version": "0.1.11" + "version": "0.1.12" } diff --git a/custom_components/purrsong/sensor.py b/custom_components/purrsong/sensor.py index 9fdd6a2..52b20df 100644 --- a/custom_components/purrsong/sensor.py +++ b/custom_components/purrsong/sensor.py @@ -14,10 +14,9 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import( PERCENTAGE, - TIME_MINUTES, - TIME_SECONDS, UnitOfMass, UnitOfTemperature, + UnitOfTime, ) from homeassistant.core import HomeAssistant @@ -206,10 +205,10 @@ def native_value(self) -> float | int: return round(self.cat_data.duration, 1) @property - def native_unit_of_measurement(self) -> str: + def native_unit_of_measurement(self) -> UnitOfTime: """ Return seconds as the native unit """ - return TIME_SECONDS + return UnitOfTime.SECONDS @property def icon(self) -> str: @@ -722,10 +721,10 @@ def native_value(self) -> float: return round(self.device_data.last_used_duration, 1) @property - def native_unit_of_measurement(self) -> str: + def native_unit_of_measurement(self) -> UnitOfTime: """ Return seconds as the native unit """ - return TIME_SECONDS + return UnitOfTime.SECONDS @property def state_class(self) -> SensorStateClass: @@ -1050,10 +1049,10 @@ def native_value(self) -> int: return self.device_data.wait_time @property - def native_unit_of_measurement(self) -> str: + def native_unit_of_measurement(self) -> UnitOfTime: """ Return minutes as the native unit """ - return TIME_MINUTES + return UnitOfTime.MINUTES @property def entity_category(self) -> EntityCategory: diff --git a/hacs.json b/hacs.json index 69d4f1d..f70123c 100644 --- a/hacs.json +++ b/hacs.json @@ -3,7 +3,7 @@ "name": "Lavviebot S", "render_readme": true, "country": "US", - "homeassistant": "2022.11.0b0", + "homeassistant": "2023.12.0", "zip_release": true, "filename": "purrsong.zip" }