Fix Ruff - add absolute humidity

This commit is contained in:
jbouwh
2025-08-20 18:34:31 +00:00
parent 78f323e5e6
commit 7f5ad1e9ec
2 changed files with 3 additions and 4 deletions

View File

@@ -336,6 +336,7 @@
"selector": { "selector": {
"device_class": { "device_class": {
"options": { "options": {
"absolute_humidity": "[%key:component::sensor::entity_component::absolute_humidity::name%]",
"apparent_power": "[%key:component::sensor::entity_component::apparent_power::name%]", "apparent_power": "[%key:component::sensor::entity_component::apparent_power::name%]",
"area": "[%key:component::sensor::entity_component::area::name%]", "area": "[%key:component::sensor::entity_component::area::name%]",
"aqi": "[%key:component::sensor::entity_component::aqi::name%]", "aqi": "[%key:component::sensor::entity_component::aqi::name%]",

View File

@@ -1453,8 +1453,7 @@ class SensorDeviceClassSelector(DeviceClassSelector):
"""Selector for a sensor device class.""" """Selector for a sensor device class."""
def _default_device_classes(self) -> list[str]: def _default_device_classes(self) -> list[str]:
# pylint: disable-next=import-outside-toplevel from homeassistant.components.sensor import SensorDeviceClass # noqa: PLC0415
from homeassistant.components.sensor import SensorDeviceClass
return [device_class.value for device_class in SensorDeviceClass] return [device_class.value for device_class in SensorDeviceClass]
@@ -1494,8 +1493,7 @@ class SensorStateClassSelector(Selector[SensorStateClassSelectorConfig]):
def __call__(self, data: Any) -> Any: def __call__(self, data: Any) -> Any:
"""Return valid device classes.""" """Return valid device classes."""
# pylint: disable-next=import-outside-toplevel from homeassistant.components.sensor import SensorStateClass # noqa: PLC0415
from homeassistant.components.sensor import SensorStateClass
state_classes: Sequence[str] = [] state_classes: Sequence[str] = []
if config_state_classes := self.config.get( if config_state_classes := self.config.get(