Entity and climate: do not convert temperature unnecessary (#4522)
* Climate: more consistent units * Prevent unnecessary conversion in entity component * int -> round * Disable Google tests because they connect to the internet * Remove default conversion rounding F->C * Add rounding of temp to weather comp * Fix equality * Maintain precision when converting temp in entity * Revert "Disable Google tests because they connect to the internet" This reverts commit b60485dc19bb97f4a502854d5ff2297330df0b40.
This commit is contained in:
parent
00019b9ff0
commit
2c7e895105
5 changed files with 34 additions and 18 deletions
|
@ -80,7 +80,8 @@ class TestUnitSystem(unittest.TestCase):
|
|||
METRIC_SYSTEM.temperature(25, METRIC_SYSTEM.temperature_unit))
|
||||
self.assertEqual(
|
||||
26.7,
|
||||
METRIC_SYSTEM.temperature(80, IMPERIAL_SYSTEM.temperature_unit))
|
||||
round(METRIC_SYSTEM.temperature(
|
||||
80, IMPERIAL_SYSTEM.temperature_unit), 1))
|
||||
|
||||
def test_temperature_to_imperial(self):
|
||||
"""Test temperature conversion to imperial system."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue