async def test_set_hot_water_setpoint_temp_number_to_round(
        manager: SystemManager, resp: aioresponses) -> None:
    url = urls.hot_water_temperature_setpoint(serial=SERIAL, id="id")
    payload = payloads.hotwater_temperature_setpoint(60.5)

    resp.put(url, status=200)

    await manager.set_hot_water_setpoint_temperature("id", 60.4)
    _assert_calls(1, manager, [url], [payload])
Esempio n. 2
0
async def test_set_hot_water_setpoint_temperature(manager: SystemManager,
                                                  resp: aioresponses) -> None:
    url = urls.hot_water_temperature_setpoint(id='id', serial=SERIAL)
    payload = payloads.hotwater_temperature_setpoint(60.0)

    resp.put(url, status=200)

    await manager.set_hot_water_setpoint_temperature('id', 60)

    _assert_calls(1, manager, [url], [payload])