mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Adjust WeatherFlow air density sensor device class and unit (#101777)
This commit is contained in:
parent
1a348babd4
commit
36fcf198b1
@ -21,7 +21,6 @@ from homeassistant.components.sensor import (
|
|||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
|
||||||
DEGREE,
|
DEGREE,
|
||||||
LIGHT_LUX,
|
LIGHT_LUX,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
@ -80,11 +79,10 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="air_density",
|
key="air_density",
|
||||||
translation_key="air_density",
|
translation_key="air_density",
|
||||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
native_unit_of_measurement="kg/m³",
|
||||||
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
|
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
suggested_display_precision=3,
|
suggested_display_precision=5,
|
||||||
raw_data_conv_fn=lambda raw_data: raw_data.m * 1000000,
|
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
|
||||||
),
|
),
|
||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="air_temperature",
|
key="air_temperature",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user