mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-10-13 00:03:53 +00:00
Add fixtures for KH100, KE100 and KE110 and simulate TRV states (#1726)
This PR adds fixture files for: - KH100 (UK), hardware 1.0, firmware 1.7.5 - KE100 (UK), hardware 1.0, firmware 2.15.0 - KE110 (EU), hardware 1.0, firmware 1.4.0 The fixtures were collected from physical devices and anonymized for use in development and testing. The KE110 fixture is a new device model and has been added to the appropriate fixture category. This also improves test suite by adding TRV state simulation to allow tests pass on fixtures that report a non-heating state. --------- Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
This commit is contained in:
@@ -404,15 +404,16 @@ async def test_thermostat(dev: Device, mocker: MockerFixture) -> None:
|
||||
assert therm_mod.state is False
|
||||
assert therm_mod.mode is ThermostatState.Off
|
||||
|
||||
await therm_mod.set_target_temperature(10)
|
||||
temp_control = dev.modules.get(Module.TemperatureControl)
|
||||
assert temp_control
|
||||
max_temp = temp_control.maximum_target_temperature
|
||||
await therm_mod.set_target_temperature(max_temp)
|
||||
await dev.update()
|
||||
assert therm_mod.state is True
|
||||
assert therm_mod.mode is ThermostatState.Heating
|
||||
assert therm_mod.target_temperature == 10
|
||||
assert therm_mod.target_temperature == max_temp
|
||||
|
||||
target_temperature_feature = therm_mod.get_feature(therm_mod.set_target_temperature)
|
||||
temp_control = dev.modules.get(Module.TemperatureControl)
|
||||
assert temp_control
|
||||
allowed_range = temp_control.allowed_temperature_range
|
||||
assert target_temperature_feature.minimum_value == allowed_range[0]
|
||||
assert target_temperature_feature.maximum_value == allowed_range[1]
|
||||
|
||||
Reference in New Issue
Block a user