mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 16:38:16 +01:00
Fix units for SPS30 number concentration sensors (#5452)
This commit is contained in:
parent
88bb051f37
commit
050fa0d4c1
2 changed files with 7 additions and 7 deletions
|
@ -20,7 +20,7 @@ from esphome.const import (
|
||||||
DEVICE_CLASS_PM25,
|
DEVICE_CLASS_PM25,
|
||||||
STATE_CLASS_MEASUREMENT,
|
STATE_CLASS_MEASUREMENT,
|
||||||
UNIT_MICROGRAMS_PER_CUBIC_METER,
|
UNIT_MICROGRAMS_PER_CUBIC_METER,
|
||||||
UNIT_COUNTS_PER_CUBIC_METER,
|
UNIT_COUNTS_PER_CUBIC_CENTIMETER,
|
||||||
UNIT_MICROMETER,
|
UNIT_MICROMETER,
|
||||||
ICON_CHEMICAL_WEAPON,
|
ICON_CHEMICAL_WEAPON,
|
||||||
ICON_COUNTER,
|
ICON_COUNTER,
|
||||||
|
@ -73,31 +73,31 @@ CONFIG_SCHEMA = (
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PMC_0_5): sensor.sensor_schema(
|
cv.Optional(CONF_PMC_0_5): sensor.sensor_schema(
|
||||||
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_METER,
|
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_CENTIMETER,
|
||||||
icon=ICON_COUNTER,
|
icon=ICON_COUNTER,
|
||||||
accuracy_decimals=2,
|
accuracy_decimals=2,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PMC_1_0): sensor.sensor_schema(
|
cv.Optional(CONF_PMC_1_0): sensor.sensor_schema(
|
||||||
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_METER,
|
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_CENTIMETER,
|
||||||
icon=ICON_COUNTER,
|
icon=ICON_COUNTER,
|
||||||
accuracy_decimals=2,
|
accuracy_decimals=2,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PMC_2_5): sensor.sensor_schema(
|
cv.Optional(CONF_PMC_2_5): sensor.sensor_schema(
|
||||||
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_METER,
|
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_CENTIMETER,
|
||||||
icon=ICON_COUNTER,
|
icon=ICON_COUNTER,
|
||||||
accuracy_decimals=2,
|
accuracy_decimals=2,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PMC_4_0): sensor.sensor_schema(
|
cv.Optional(CONF_PMC_4_0): sensor.sensor_schema(
|
||||||
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_METER,
|
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_CENTIMETER,
|
||||||
icon=ICON_COUNTER,
|
icon=ICON_COUNTER,
|
||||||
accuracy_decimals=2,
|
accuracy_decimals=2,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PMC_10_0): sensor.sensor_schema(
|
cv.Optional(CONF_PMC_10_0): sensor.sensor_schema(
|
||||||
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_METER,
|
unit_of_measurement=UNIT_COUNTS_PER_CUBIC_CENTIMETER,
|
||||||
icon=ICON_COUNTER,
|
icon=ICON_COUNTER,
|
||||||
accuracy_decimals=2,
|
accuracy_decimals=2,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
|
|
|
@ -915,7 +915,7 @@ UNIT_BYTES = "B"
|
||||||
UNIT_CELSIUS = "°C"
|
UNIT_CELSIUS = "°C"
|
||||||
UNIT_CENTIMETER = "cm"
|
UNIT_CENTIMETER = "cm"
|
||||||
UNIT_COUNT_DECILITRE = "/dL"
|
UNIT_COUNT_DECILITRE = "/dL"
|
||||||
UNIT_COUNTS_PER_CUBIC_METER = "#/m³"
|
UNIT_COUNTS_PER_CUBIC_CENTIMETER = "#/cm³"
|
||||||
UNIT_CUBIC_METER = "m³"
|
UNIT_CUBIC_METER = "m³"
|
||||||
UNIT_CUBIC_METER_PER_HOUR = "m³/h"
|
UNIT_CUBIC_METER_PER_HOUR = "m³/h"
|
||||||
UNIT_DECIBEL = "dB"
|
UNIT_DECIBEL = "dB"
|
||||||
|
|
Loading…
Reference in a new issue