mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
Add precipitation device class (#4219)
This commit is contained in:
parent
57a1c207c2
commit
7e376ae952
3 changed files with 6 additions and 1 deletions
|
@ -41,6 +41,7 @@ from esphome.const import (
|
|||
DEVICE_CLASS_PM25,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_POWER_FACTOR,
|
||||
DEVICE_CLASS_PRECIPITATION,
|
||||
DEVICE_CLASS_PRECIPITATION_INTENSITY,
|
||||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_REACTIVE_POWER,
|
||||
|
@ -84,6 +85,7 @@ DEVICE_CLASSES = [
|
|||
DEVICE_CLASS_PM25,
|
||||
DEVICE_CLASS_POWER_FACTOR,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_PRECIPITATION,
|
||||
DEVICE_CLASS_PRECIPITATION_INTENSITY,
|
||||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_REACTIVE_POWER,
|
||||
|
|
|
@ -55,6 +55,7 @@ from esphome.const import (
|
|||
DEVICE_CLASS_PM25,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_POWER_FACTOR,
|
||||
DEVICE_CLASS_PRECIPITATION,
|
||||
DEVICE_CLASS_PRECIPITATION_INTENSITY,
|
||||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_REACTIVE_POWER,
|
||||
|
@ -103,6 +104,7 @@ DEVICE_CLASSES = [
|
|||
DEVICE_CLASS_PM25,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_POWER_FACTOR,
|
||||
DEVICE_CLASS_PRECIPITATION,
|
||||
DEVICE_CLASS_PRECIPITATION_INTENSITY,
|
||||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_REACTIVE_POWER,
|
||||
|
@ -115,8 +117,8 @@ DEVICE_CLASSES = [
|
|||
DEVICE_CLASS_VOLTAGE,
|
||||
DEVICE_CLASS_VOLUME,
|
||||
DEVICE_CLASS_WATER,
|
||||
DEVICE_CLASS_WIND_SPEED,
|
||||
DEVICE_CLASS_WEIGHT,
|
||||
DEVICE_CLASS_WIND_SPEED,
|
||||
]
|
||||
|
||||
sensor_ns = cg.esphome_ns.namespace("sensor")
|
||||
|
|
|
@ -954,6 +954,7 @@ DEVICE_CLASS_PM1 = "pm1"
|
|||
DEVICE_CLASS_PM10 = "pm10"
|
||||
DEVICE_CLASS_PM25 = "pm25"
|
||||
DEVICE_CLASS_POWER_FACTOR = "power_factor"
|
||||
DEVICE_CLASS_PRECIPITATION = "precipitation"
|
||||
DEVICE_CLASS_PRECIPITATION_INTENSITY = "precipitation_intensity"
|
||||
DEVICE_CLASS_PRESSURE = "pressure"
|
||||
DEVICE_CLASS_REACTIVE_POWER = "reactive_power"
|
||||
|
|
Loading…
Reference in a new issue