Skip to content

Commit

Permalink
import ATTR_STATE_CLASS instead of CONF_STATE_CLASS
Browse files Browse the repository at this point in the history
  • Loading branch information
golles committed Feb 4, 2022
1 parent 0c88de0 commit 47d4a35
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions custom_components/knmi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_SAFETY,
)
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT
from homeassistant.components.sensor.const import CONF_STATE_CLASS
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
ATTR_STATE_CLASS,
)
from homeassistant.components.weather import (
ATTR_CONDITION_CLEAR_NIGHT,
ATTR_CONDITION_CLOUDY,
Expand Down Expand Up @@ -71,7 +73,7 @@
"device_class": DEVICE_CLASS_TEMPERATURE,
"attributes": [
{
"name": CONF_STATE_CLASS,
"name": ATTR_STATE_CLASS,
"value": STATE_CLASS_MEASUREMENT,
},
],
Expand All @@ -84,7 +86,7 @@
"device_class": DEVICE_CLASS_TEMPERATURE,
"attributes": [
{
"name": CONF_STATE_CLASS,
"name": ATTR_STATE_CLASS,
"value": STATE_CLASS_MEASUREMENT,
},
],
Expand Down

0 comments on commit 47d4a35

Please sign in to comment.