Fix fritzbox climate HVAC mode / temperature (#25275)

* Set the target temperature

* Update tests

* Update tests

* Fix linter complaints
This commit is contained in:
cgtobi 2019-07-19 09:49:28 +02:00 committed by Pascal Vizeli
parent bc7e1a3797
commit 1eb66f3657
2 changed files with 11 additions and 7 deletions

View file

@ -66,10 +66,10 @@ class TestFritzboxClimate(unittest.TestCase):
assert 19.5 == self.thermostat.target_temperature
self.thermostat._target_temperature = 126.5
assert self.thermostat.target_temperature is None
assert self.thermostat.target_temperature == 0.0
self.thermostat._target_temperature = 127.0
assert self.thermostat.target_temperature is None
assert self.thermostat.target_temperature == 30.0
@patch.object(FritzboxThermostat, 'set_hvac_mode')
def test_set_temperature_operation_mode(self, mock_set_op):
@ -103,7 +103,7 @@ class TestFritzboxClimate(unittest.TestCase):
self.thermostat._target_temperature = 127.0
assert 'heat' == self.thermostat.hvac_mode
self.thermostat._target_temperature = 126.5
assert 'heat' == self.thermostat.hvac_mode
assert 'off' == self.thermostat.hvac_mode
self.thermostat._target_temperature = 22.0
assert 'heat' == self.thermostat.hvac_mode
self.thermostat._target_temperature = 16.0