From f3c5a02b02579597497fc5a615f72a6ddc1fda86 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 30 Dec 2023 20:57:02 +0100 Subject: [PATCH] Updated myPyllant library to version with multiple heatpump support --- .pre-commit-config.yaml | 2 +- custom_components/mypyllant/manifest.json | 4 ++-- dev-requirements.txt | 2 +- tests/test_sensor.py | 10 +++++----- tests/test_water_heater.py | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9edc89b..f1d3fc8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: - aioresponses - pytest - types-requests - - myPyllant==0.6.7 + - myPyllant==0.6.8 - polyfactory - repo: local hooks: diff --git a/custom_components/mypyllant/manifest.json b/custom_components/mypyllant/manifest.json index 9784328..e976170 100644 --- a/custom_components/mypyllant/manifest.json +++ b/custom_components/mypyllant/manifest.json @@ -7,6 +7,6 @@ "integration_type": "hub", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/signalkraft/mypyllant-component/issues", - "requirements": ["myPyllant==0.6.7"], - "version": "v0.7.0b3" + "requirements": ["myPyllant==0.6.8"], + "version": "v0.7.0b4" } diff --git a/dev-requirements.txt b/dev-requirements.txt index 4b151d9..87fa129 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -13,5 +13,5 @@ ruff~=0.1.9 pytest==7.4.3 pytest-cov==4.1.0 pytest-homeassistant-custom-component==0.13.77 -myPyllant==0.6.7 +myPyllant==0.6.8 dacite~=1.7.0 \ No newline at end of file diff --git a/tests/test_sensor.py b/tests/test_sensor.py index 430a047..7732421 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -110,19 +110,19 @@ async def test_circuit_sensors( ) assert isinstance( CircuitFlowTemperatureSensor(0, 0, system_coordinator_mock).native_value, - float, + (int, float, complex), ) if "heatingCurve" in str(test_data): assert isinstance( CircuitHeatingCurveSensor(0, 0, system_coordinator_mock).native_value, - float, + (int, float, complex), ) if "minFlowTemperatureSetpoint" in str(test_data): assert isinstance( CircuitMinFlowTemperatureSetpointSensor( 0, 0, system_coordinator_mock ).native_value, - float, + (int, float, complex), ) await mocked_api.aiohttp_session.close() @@ -152,7 +152,7 @@ async def test_domestic_hot_water_sensor( ) assert isinstance( DomesticHotWaterSetPointSensor(0, 0, system_coordinator_mock).native_value, - float, + (int, float, complex), ) assert isinstance( DomesticHotWaterCurrentSpecialFunctionSensor( @@ -192,7 +192,7 @@ async def test_data_sensor( ) assert isinstance( data_sensor.native_value, - float, + (int, float, complex), ) assert isinstance( data_sensor.name, diff --git a/tests/test_water_heater.py b/tests/test_water_heater.py index c57a068..e6bc600 100644 --- a/tests/test_water_heater.py +++ b/tests/test_water_heater.py @@ -23,10 +23,10 @@ async def test_water_heater( ) dhw = DomesticHotWaterEntity(0, 0, system_coordinator_mock) assert isinstance(dhw.device_info, dict) - assert isinstance(dhw.min_temp, float) - assert isinstance(dhw.max_temp, float) + assert isinstance(dhw.min_temp, (int, float, complex)) + assert isinstance(dhw.max_temp, (int, float, complex)) if "currentTemperature" in test_data: - assert isinstance(dhw.current_temperature, float) + assert isinstance(dhw.current_temperature, (int, float, complex)) assert isinstance(dhw.operation_list, list) assert isinstance(dhw.extra_state_attributes, dict) assert dhw.current_operation in dhw.operation_list