Skip to content

Commit

Permalink
Fixing State class and device class missmatch custom-components#288
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Jägare Lilja committed Mar 27, 2023
1 parent 8d76be1 commit 531c303
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/nordpool/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from homeassistant.util import dt as dt_utils

# Import sensor entity and classes.
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass, SensorEntity
from jinja2 import pass_context

from . import (
Expand Down Expand Up @@ -136,7 +136,7 @@ class NordpoolSensor(SensorEntity):
"Sensors data"
_attr_device_class = SensorDeviceClass.MONETARY
_attr_suggested_display_precision = None

_attr_state_class = SensorStateClass.TOTAL
def __init__(
self,
friendly_name,
Expand Down

0 comments on commit 531c303

Please sign in to comment.