mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 12:15:08 +02:00
Add state class to Aurora (#88938)
* Bump aurora_api version to fix issues with NOAA conversion values. Fix #82587 * update requirements for aurora. * Add state_class to aurora sensor. * Fixed environment to run requirements_all script. * Revert "Add state_class to aurora sensor." This reverts commit213e21e842
. * Add state class to aurora sensor. * Revert "Fixed environment to run requirements_all script." This reverts commitf3f624226e
. * Revert "update requirements for aurora." This reverts commita3546ad88d
. * Revert "Bump aurora_api version to fix issues with NOAA conversion values. Fix #82587" This reverts commitfaf3ba7b5b
. * Move state class to _attr_state_class.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
"""Support for Aurora Forecast sensor."""
|
"""Support for Aurora Forecast sensor."""
|
||||||
from homeassistant.components.sensor import SensorEntity
|
from homeassistant.components.sensor import SensorEntity, SensorStateClass
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import PERCENTAGE
|
from homeassistant.const import PERCENTAGE
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@@ -28,6 +28,7 @@ class AuroraSensor(AuroraEntity, SensorEntity):
|
|||||||
"""Implementation of an aurora sensor."""
|
"""Implementation of an aurora sensor."""
|
||||||
|
|
||||||
_attr_native_unit_of_measurement = PERCENTAGE
|
_attr_native_unit_of_measurement = PERCENTAGE
|
||||||
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
|
Reference in New Issue
Block a user