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": {
|
"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%]",
|
||||||
|
@@ -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(
|
||||||
|
Reference in New Issue
Block a user