mirror of
https://github.com/home-assistant/core.git
synced 2025-08-30 18:01:31 +02:00
Fix Ruff - add absolute humidity
This commit is contained in:
@@ -336,6 +336,7 @@
|
||||
"selector": {
|
||||
"device_class": {
|
||||
"options": {
|
||||
"absolute_humidity": "[%key:component::sensor::entity_component::absolute_humidity::name%]",
|
||||
"apparent_power": "[%key:component::sensor::entity_component::apparent_power::name%]",
|
||||
"area": "[%key:component::sensor::entity_component::area::name%]",
|
||||
"aqi": "[%key:component::sensor::entity_component::aqi::name%]",
|
||||
|
@@ -1453,8 +1453,7 @@ class SensorDeviceClassSelector(DeviceClassSelector):
|
||||
"""Selector for a sensor device class."""
|
||||
|
||||
def _default_device_classes(self) -> list[str]:
|
||||
# pylint: disable-next=import-outside-toplevel
|
||||
from homeassistant.components.sensor import SensorDeviceClass
|
||||
from homeassistant.components.sensor import SensorDeviceClass # noqa: PLC0415
|
||||
|
||||
return [device_class.value for device_class in SensorDeviceClass]
|
||||
|
||||
@@ -1494,8 +1493,7 @@ class SensorStateClassSelector(Selector[SensorStateClassSelectorConfig]):
|
||||
def __call__(self, data: Any) -> Any:
|
||||
"""Return valid device classes."""
|
||||
|
||||
# pylint: disable-next=import-outside-toplevel
|
||||
from homeassistant.components.sensor import SensorStateClass
|
||||
from homeassistant.components.sensor import SensorStateClass # noqa: PLC0415
|
||||
|
||||
state_classes: Sequence[str] = []
|
||||
if config_state_classes := self.config.get(
|
||||
|
Reference in New Issue
Block a user