Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing State class and device class missmatch #288 #309

Merged
merged 2 commits into from
May 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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