Skip to content

Commit

Permalink
Heatit Z-TRM3 fix: fix the MaxVersion value for the Thermostat Setpoi…
Browse files Browse the repository at this point in the history
…nt command (to 3), so that the actual version is requested during init. Removed the hardcoded version test hack.
  • Loading branch information
medoc92 committed Feb 16, 2022
1 parent 3f2d164 commit 7ddd06a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ bool ThermostatSetpoint::HandleMsg
{
if( ( _data[i] & (1<<bit) ) != 0 )
{
Log::Write( LogLevel_Info, GetNodeId(), "Received supported thermostat setpoints version is %d", int(GetVersion()) );
// Note: version 1.6 tests for >= 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 7ddd06a

Please sign in to comment.