mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Add state class to Aurora ABB Solar PV (#52108)
This commit is contained in:
parent
b9e6a6b3b8
commit
0ddd858b4b
@ -5,7 +5,11 @@ import logging
|
||||
from aurorapy.client import AuroraError, AuroraSerialClient
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
SensorEntity,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
CONF_ADDRESS,
|
||||
CONF_DEVICE,
|
||||
@ -46,6 +50,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
class AuroraABBSolarPVMonitorSensor(SensorEntity):
|
||||
"""Representation of a Sensor."""
|
||||
|
||||
_attr_state_class = STATE_CLASS_MEASUREMENT
|
||||
|
||||
def __init__(self, client, name, typename):
|
||||
"""Initialize the sensor."""
|
||||
self._name = f"{name} {typename}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user