Skip to content

Commit

Permalink
Remove deprecated constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Feb 27, 2024
1 parent 68da637 commit e4c2500
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/iaquk/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Base component constants
NAME: Final = "Indoor Air Quality UK Index"
DOMAIN: Final = "iaquk"
VERSION: Final = "1.6.6"
VERSION: Final = "1.6.7-alpha"
ISSUE_URL: Final = "https://github.com/Limych/ha-iaquk/issues"

STARTUP_MESSAGE: Final = f"""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/iaquk/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"iot_class": "calculated",
"issue_tracker": "https://github.com/Limych/ha-iaquk/issues",
"requirements": [],
"version": "1.6.6"
"version": "1.6.7-alpha"
}
4 changes: 2 additions & 2 deletions custom_components/iaquk/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from homeassistant.components.sensor import (
ENTITY_ID_FORMAT,
STATE_CLASS_MEASUREMENT,
SensorEntity,
SensorStateClass,
)
from homeassistant.const import CONF_NAME, CONF_SENSORS
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -73,7 +73,7 @@ def __init__(self, controller, sensor_type: str):
self._attr_unique_id = f"{controller.unique_id}_{sensor_type}"
self._attr_name = f"{controller.name} {SENSORS[sensor_type]}"
self._attr_state_class = (
STATE_CLASS_MEASUREMENT if sensor_type == SENSOR_INDEX else None
SensorStateClass.MEASUREMENT if sensor_type == SENSOR_INDEX else None
)
self._attr_device_class = (
f"{DOMAIN}__level" if sensor_type == SENSOR_LEVEL else None
Expand Down

0 comments on commit e4c2500

Please sign in to comment.