Add new data rate device class (#83377)
parent
c4afc33fc5
commit
9987f7a125
|
@ -93,6 +93,12 @@ class NumberDeviceClass(StrEnum):
|
|||
Unit of measurement: `A`
|
||||
"""
|
||||
|
||||
DATA_RATE = "data_rate"
|
||||
"""Data rate.
|
||||
|
||||
Unit of measurement: UnitOfDataRate
|
||||
"""
|
||||
|
||||
DATA_SIZE = "data_size"
|
||||
"""Data size.
|
||||
|
||||
|
|
|
@ -157,6 +157,12 @@ class SensorDeviceClass(StrEnum):
|
|||
Unit of measurement: `A`
|
||||
"""
|
||||
|
||||
DATA_RATE = "data_rate"
|
||||
"""Data rate.
|
||||
|
||||
Unit of measurement: UnitOfDataRate
|
||||
"""
|
||||
|
||||
DATA_SIZE = "data_size"
|
||||
"""Data size.
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ CONF_IS_BATTERY_LEVEL = "is_battery_level"
|
|||
CONF_IS_CO = "is_carbon_monoxide"
|
||||
CONF_IS_CO2 = "is_carbon_dioxide"
|
||||
CONF_IS_CURRENT = "is_current"
|
||||
CONF_IS_DATA_RATE = "is_data_rate"
|
||||
CONF_IS_DATA_SIZE = "is_data_size"
|
||||
CONF_IS_DISTANCE = "is_distance"
|
||||
CONF_IS_ENERGY = "is_energy"
|
||||
|
@ -75,6 +76,7 @@ ENTITY_CONDITIONS = {
|
|||
SensorDeviceClass.CO: [{CONF_TYPE: CONF_IS_CO}],
|
||||
SensorDeviceClass.CO2: [{CONF_TYPE: CONF_IS_CO2}],
|
||||
SensorDeviceClass.CURRENT: [{CONF_TYPE: CONF_IS_CURRENT}],
|
||||
SensorDeviceClass.DATA_RATE: [{CONF_TYPE: CONF_IS_DATA_RATE}],
|
||||
SensorDeviceClass.DATA_SIZE: [{CONF_TYPE: CONF_IS_DATA_SIZE}],
|
||||
SensorDeviceClass.DISTANCE: [{CONF_TYPE: CONF_IS_DISTANCE}],
|
||||
SensorDeviceClass.ENERGY: [{CONF_TYPE: CONF_IS_ENERGY}],
|
||||
|
@ -124,6 +126,7 @@ CONDITION_SCHEMA = vol.All(
|
|||
CONF_IS_CO,
|
||||
CONF_IS_CO2,
|
||||
CONF_IS_CURRENT,
|
||||
CONF_IS_DATA_RATE,
|
||||
CONF_IS_DATA_SIZE,
|
||||
CONF_IS_DISTANCE,
|
||||
CONF_IS_ENERGY,
|
||||
|
|
|
@ -35,6 +35,7 @@ CONF_BATTERY_LEVEL = "battery_level"
|
|||
CONF_CO = "carbon_monoxide"
|
||||
CONF_CO2 = "carbon_dioxide"
|
||||
CONF_CURRENT = "current"
|
||||
CONF_DATA_RATE = "data_rate"
|
||||
CONF_DATA_SIZE = "data_size"
|
||||
CONF_DISTANCE = "distance"
|
||||
CONF_ENERGY = "energy"
|
||||
|
@ -74,6 +75,7 @@ ENTITY_TRIGGERS = {
|
|||
SensorDeviceClass.CO: [{CONF_TYPE: CONF_CO}],
|
||||
SensorDeviceClass.CO2: [{CONF_TYPE: CONF_CO2}],
|
||||
SensorDeviceClass.CURRENT: [{CONF_TYPE: CONF_CURRENT}],
|
||||
SensorDeviceClass.DATA_RATE: [{CONF_TYPE: CONF_DATA_RATE}],
|
||||
SensorDeviceClass.DATA_SIZE: [{CONF_TYPE: CONF_DATA_SIZE}],
|
||||
SensorDeviceClass.DISTANCE: [{CONF_TYPE: CONF_DISTANCE}],
|
||||
SensorDeviceClass.ENERGY: [{CONF_TYPE: CONF_ENERGY}],
|
||||
|
@ -124,6 +126,7 @@ TRIGGER_SCHEMA = vol.All(
|
|||
CONF_CO,
|
||||
CONF_CO2,
|
||||
CONF_CURRENT,
|
||||
CONF_DATA_RATE,
|
||||
CONF_DATA_SIZE,
|
||||
CONF_DISTANCE,
|
||||
CONF_ENERGY,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"is_carbon_monoxide": "Current {entity_name} carbon monoxide concentration level",
|
||||
"is_carbon_dioxide": "Current {entity_name} carbon dioxide concentration level",
|
||||
"is_current": "Current {entity_name} current",
|
||||
"is_data_rate": "Current {entity_name} data rate",
|
||||
"is_data_size": "Current {entity_name} data size",
|
||||
"is_distance": "Current {entity_name} distance",
|
||||
"is_energy": "Current {entity_name} energy",
|
||||
|
@ -43,7 +44,7 @@
|
|||
"carbon_monoxide": "{entity_name} carbon monoxide concentration changes",
|
||||
"carbon_dioxide": "{entity_name} carbon dioxide concentration changes",
|
||||
"current": "{entity_name} current changes",
|
||||
"data_size": "{entity_name} data size changes",
|
||||
"data_rate": "{entity_name} data rate changes",
|
||||
"distance": "{entity_name} distance changes",
|
||||
"energy": "{entity_name} energy changes",
|
||||
"frequency": "{entity_name} frequency changes",
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"is_carbon_dioxide": "Current {entity_name} carbon dioxide concentration level",
|
||||
"is_carbon_monoxide": "Current {entity_name} carbon monoxide concentration level",
|
||||
"is_current": "Current {entity_name} current",
|
||||
"is_data_rate": "Current {entity_name} data rate",
|
||||
"is_data_size": "Current {entity_name} data size",
|
||||
"is_distance": "Current {entity_name} distance",
|
||||
"is_energy": "Current {entity_name} energy",
|
||||
|
@ -42,6 +43,7 @@
|
|||
"carbon_dioxide": "{entity_name} carbon dioxide concentration changes",
|
||||
"carbon_monoxide": "{entity_name} carbon monoxide concentration changes",
|
||||
"current": "{entity_name} current changes",
|
||||
"data_rate": "{entity_name} data rate changes",
|
||||
"data_size": "{entity_name} data size changes",
|
||||
"distance": "{entity_name} distance changes",
|
||||
"energy": "{entity_name} energy changes",
|
||||
|
|
Loading…
Reference in New Issue