Skip to content

Commit e899e16

Browse files
committed
Implement review-comment
1 parent 2d27616 commit e899e16

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

plugwise/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@
437437
# Added measurements from actuator_functionalities/thermostat_functionality
438438
"lower_bound": {ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS},
439439
"upper_bound": {ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS},
440-
"resolution": {ATTR_UNIT_OF_MEASUREMENT: TEMP_KELVIN},
440+
"resolution": {ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS},
441441
}
442442

443443
# Heater Central related measurements

plugwise/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
PERCENTAGE,
2020
PLUGWISE_EPOCH,
2121
TEMP_CELSIUS,
22-
TEMP_KELVIN,
2322
UTF8_DECODE,
2423
VOLUME_CUBIC_METERS,
2524
)
@@ -100,7 +99,7 @@ def format_measure(measure: str, unit: str) -> float | int | bool:
10099
"""Format measure to correct type."""
101100
try:
102101
measure = int(measure)
103-
if unit in [TEMP_CELSIUS, TEMP_KELVIN]:
102+
if unit == TEMP_CELSIUS:
104103
measure = float(measure)
105104
except ValueError:
106105
if unit == PERCENTAGE:

0 commit comments

Comments
 (0)