add additional weather sensor options (VOC, IAQ, CO2)
This commit is contained in:
parent
bf23e23c0f
commit
3b554b5660
@ -47,6 +47,9 @@ class WeatherSensor(Flag):
|
|||||||
RAIN_INTENSITY = auto()
|
RAIN_INTENSITY = auto()
|
||||||
RAIN_PROBABILITY = auto()
|
RAIN_PROBABILITY = auto()
|
||||||
SOLAR_RADIATION = auto()
|
SOLAR_RADIATION = auto()
|
||||||
|
IAQ = auto()
|
||||||
|
VOC = auto()
|
||||||
|
CO2 = auto()
|
||||||
|
|
||||||
|
|
||||||
# Constants used to create a family of light sensors.
|
# Constants used to create a family of light sensors.
|
||||||
@ -324,6 +327,12 @@ class Publisher:
|
|||||||
keys.append("rain_probability")
|
keys.append("rain_probability")
|
||||||
if WeatherSensor.SOLAR_RADIATION in version:
|
if WeatherSensor.SOLAR_RADIATION in version:
|
||||||
keys.append("solar_radiation")
|
keys.append("solar_radiation")
|
||||||
|
if WeatherSensor.IAQ in version:
|
||||||
|
keys.append("iaq")
|
||||||
|
if WeatherSensor.VOC in version:
|
||||||
|
keys.append("voc")
|
||||||
|
if WeatherSensor.CO2 in version:
|
||||||
|
keys.append("co2")
|
||||||
|
|
||||||
return Payload(self, "weather", keys=keys,
|
return Payload(self, "weather", keys=keys,
|
||||||
presets=[("version", version.value)])
|
presets=[("version", version.value)])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user