Add and use more unit constants (#32122)
* Add and use speed constants * Add and use meter based volume and area constants * Add and use more mass unit constants * Add and use concentration unit constants * Add and use watts per square meter constant * Use more time constants * Use more data constants
This commit is contained in:
1 parent
c98f50115d
commit
496bd3dddf
44 files changed
+422
-177
No files matched your search
@@ -2,7 +2,7 @@
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT, VOLUME_CUBIC_METERS
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import DATA_SMAPPEE
|
||||
@@ -43,8 +43,20 @@ SENSOR_TYPES = {
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
"consumption",
|
||||
],
|
||||
"water_sensor_1": ["Water Sensor 1", "mdi:water", "water", "m3", "value1"],
|
||||
"water_sensor_2": ["Water Sensor 2", "mdi:water", "water", "m3", "value2"],
|
||||
"water_sensor_1": [
|
||||
"Water Sensor 1",
|
||||
"mdi:water",
|
||||
"water",
|
||||
VOLUME_CUBIC_METERS,
|
||||
"value1",
|
||||
],
|
||||
"water_sensor_2": [
|
||||
"Water Sensor 2",
|
||||
"mdi:water",
|
||||
"water",
|
||||
VOLUME_CUBIC_METERS,
|
||||
"value2",
|
||||
],
|
||||
"water_sensor_temperature": [
|
||||
"Water Sensor Temperature",
|
||||
"mdi:temperature-celsius",
|
||||
|
||||
Reference in new issue
Block a user