Skip to content

Commit ab17334

Browse files
committed
Changed: MySensors, not ignoring switch change check for Scene On/Off types
1 parent 7807147 commit ab17334

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hardware/MySensorsBase.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,10 @@ void MySensorsBase::UpdateSwitch(const _eSetType vType, const unsigned char Idx,
11041104
result = m_sql.safe_query("SELECT Name,nValue,sValue FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID=='%q') AND (Unit==%d) AND (Type==%d) AND (Subtype==%d)", m_HwdID, szIdx, SubUnit, int(pTypeLighting2), int(sTypeAC));
11051105
if (!result.empty())
11061106
{
1107-
if ((vType != V_TRIPPED) || (!bOn))
1107+
if (
1108+
(((vType != V_TRIPPED) || (!bOn))) &&
1109+
((vType != V_SCENE_OFF) && (vType != V_SCENE_ON))
1110+
)
11081111
{
11091112
//check if we have a change, if not do not update it
11101113
int nvalue = atoi(result[0][1].c_str());

0 commit comments

Comments
 (0)