Skip to content

Commit de64e64

Browse files
committed
Update HOME_MEASUREMENTS
1 parent 45e02e8 commit de64e64

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

plugwise/constants.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
TEMP_CELSIUS = "°C"
1414
TIME_MILLISECONDS = "ms"
1515
VOLUME_CUBIC_METERS = "m³"
16+
VOLUME_CUBIC_METERS_PER_HOUR = "m³/h"
1617

1718
### Stick constants ###
1819

@@ -290,10 +291,22 @@
290291
SWITCH_GROUP_TYPES = ["switching", "report"]
291292

292293
HOME_MEASUREMENTS = {
293-
"electricity_consumed": "power",
294-
"electricity_produced": "power",
295-
"gas_consumed": "gas",
296-
"outdoor_temperature": "temperature",
294+
"electricity_consumed": {
295+
ATTR_NAME: "power",
296+
ATTR_UNIT_OF_MEASUREMENT: POWER_WATT,
297+
},
298+
"electricity_produced": {
299+
ATTR_NAME: "power",
300+
ATTR_UNIT_OF_MEASUREMENT: POWER_WATT,
301+
},
302+
"gas_consumed": {
303+
ATTR_NAME: "gas",
304+
ATTR_UNIT_OF_MEASUREMENT: VOLUME_CUBIC_METERS,
305+
},
306+
"outdoor_temperature": {
307+
ATTR_NAME: "temperature",
308+
ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS
309+
},
297310
}
298311

299312
# Excluded:

0 commit comments

Comments
 (0)