Adding PM2.5 and PM2.5 24hr Average (#36967)
* Adding PM2.5 and PM2.5 24hr Average * Corrected unit to const.py CONCENTRATION_MICROGRAMS_PER_CUBIC_METER * Imported CONCENTRATION_MICROGRAMS_PER_CUBIC_METER for PM2.5 units * Fixed code formatting with `black`pull/36973/head
parent
b112a742b2
commit
6c2dc521a3
|
@ -10,6 +10,7 @@ from homeassistant.config_entries import SOURCE_IMPORT
|
|||
from homeassistant.const import (
|
||||
ATTR_LOCATION,
|
||||
ATTR_NAME,
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
CONF_API_KEY,
|
||||
DEGREE,
|
||||
|
@ -126,6 +127,8 @@ TYPE_TEMPF = "tempf"
|
|||
TYPE_TEMPINF = "tempinf"
|
||||
TYPE_TOTALRAININ = "totalrainin"
|
||||
TYPE_UV = "uv"
|
||||
TYPE_PM25 = "pm25"
|
||||
TYPE_PM25_24H = "pm25_24h"
|
||||
TYPE_WEEKLYRAININ = "weeklyrainin"
|
||||
TYPE_WINDDIR = "winddir"
|
||||
TYPE_WINDDIR_AVG10M = "winddir_avg10m"
|
||||
|
@ -218,6 +221,13 @@ SENSOR_TYPES = {
|
|||
TYPE_TEMPINF: ("Inside Temp", TEMP_FAHRENHEIT, TYPE_SENSOR, "temperature"),
|
||||
TYPE_TOTALRAININ: ("Lifetime Rain", "in", TYPE_SENSOR, None),
|
||||
TYPE_UV: ("uv", "Index", TYPE_SENSOR, None),
|
||||
TYPE_PM25: ("PM25", CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, TYPE_SENSOR, None),
|
||||
TYPE_PM25_24H: (
|
||||
"PM25 24h Avg",
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
TYPE_SENSOR,
|
||||
None,
|
||||
),
|
||||
TYPE_WEEKLYRAININ: ("Weekly Rain", "in", TYPE_SENSOR, None),
|
||||
TYPE_WINDDIR: ("Wind Dir", DEGREE, TYPE_SENSOR, None),
|
||||
TYPE_WINDDIR_AVG10M: ("Wind Dir Avg 10m", DEGREE, TYPE_SENSOR, None),
|
||||
|
|
Loading…
Reference in New Issue