diff --git a/homeassistant/components/sensor/strings.json b/homeassistant/components/sensor/strings.json index dfea54c54f7..d5e6c641fe2 100644 --- a/homeassistant/components/sensor/strings.json +++ b/homeassistant/components/sensor/strings.json @@ -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%]", diff --git a/homeassistant/helpers/selector.py b/homeassistant/helpers/selector.py index c1e93fba200..f845452386e 100644 --- a/homeassistant/helpers/selector.py +++ b/homeassistant/helpers/selector.py @@ -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(