From 7ddd06a9e66afbda29058e852e3e4f22c3dfb6da Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 16 Feb 2022 18:06:35 +0100 Subject: [PATCH] Heatit Z-TRM3 fix: fix the MaxVersion value for the Thermostat Setpoint command (to 3), so that the actual version is requested during init. Removed the hardcoded version test hack. --- .../openzwave/cpp/src/command_classes/ThermostatSetpoint.cpp | 4 +--- .../openzwave/cpp/src/command_classes/ThermostatSetpoint.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.cpp b/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.cpp index f8d649086..121b95335 100644 --- a/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -260,9 +260,7 @@ bool ThermostatSetpoint::HandleMsg { if( ( _data[i] & (1<= 3 here, but we seem to get 1, so the test is overridden which looks like a bad hack but seems to get things working - if (true || GetVersion() >= 3) + if (GetVersion() >= 3) { Msg* msg = new Msg("ThermostatSetpointCmd_CapabilitesGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId()); msg->SetInstance(this, _instance); diff --git a/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.h b/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.h index 595e0d30d..bb85fe126 100644 --- a/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.h +++ b/resources/python-openzwave/openzwave/cpp/src/command_classes/ThermostatSetpoint.h @@ -56,6 +56,7 @@ namespace OpenZWave virtual string const GetCommandClassName()const{ return StaticGetCommandClassName(); } virtual bool HandleMsg( uint8 const* _data, uint32 const _length, uint32 const _instance = 1 ); virtual bool SetValue( Value const& _value ); + virtual uint8 GetMaxVersion(){ return 3; } public: virtual void CreateVars( uint8 const _instance, uint8 const _index );