1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

Fix homekit: temperature calculation (#12720)

This commit is contained in:
cdce8p
2018-02-26 22:29:52 +01:00
committed by Pascal Vizeli
parent 10570f5ad6
commit 6a665ffb84
2 changed files with 7 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ from tests.common import get_test_home_assistant
def test_calc_temperature():
"""Test if temperature in Celsius is calculated correctly."""
assert calc_temperature(STATE_UNKNOWN) is None
assert calc_temperature('test') is None
assert calc_temperature('20') == 20
assert calc_temperature('20.12', TEMP_CELSIUS) == 20.12