From b874d9ca8ed98db2da32cc7fb85134d25d49b0bf Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sun, 5 May 2024 13:04:34 +0100 Subject: [PATCH] fix effective flag for setting operation mode --- custom_components/ha_ecodan/pyecodan/device.py | 2 +- test/pyecodan/test_operation_modes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/ha_ecodan/pyecodan/device.py b/custom_components/ha_ecodan/pyecodan/device.py index 16c7b81..848d9c0 100644 --- a/custom_components/ha_ecodan/pyecodan/device.py +++ b/custom_components/ha_ecodan/pyecodan/device.py @@ -8,7 +8,7 @@ class EffectiveFlags(IntFlag): Update = 0x0 Power = 0x1 - OperationModeZone1 = 0x1000004000028 + OperationModeZone1 = 0x8 class DeviceStateKeys: diff --git a/test/pyecodan/test_operation_modes.py b/test/pyecodan/test_operation_modes.py index 0e8cb99..6336feb 100644 --- a/test/pyecodan/test_operation_modes.py +++ b/test/pyecodan/test_operation_modes.py @@ -33,4 +33,4 @@ async def test_set_operation_mode(melcloud, operation_mode_index, operation_mode client.device_request.assert_called_with( "SetAtw", - melcloud.request_with(EffectiveFlags=281475043819560, OperationModeZone1=operation_mode_index)) + melcloud.request_with(EffectiveFlags=8, OperationModeZone1=operation_mode_index))