mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Fixed script error associated with unlinking remotes.
This commit is contained in:
parent
6711162c55
commit
5c06f2a6d4
5 changed files with 10 additions and 5 deletions
8
MQTT.cpp
8
MQTT.cpp
|
|
@ -121,7 +121,7 @@ void MQTTClass::receive(const char *topic, byte*payload, uint32_t length) {
|
|||
shade->setMyPosition(shade->myPos, val);
|
||||
}
|
||||
else if(strncmp(command, "sunFlag", sizeof(command)) == 0) {
|
||||
if(val >= 0) shade->sendCommand(somfy_commands::SunFlag);
|
||||
if(val > 0) shade->sendCommand(somfy_commands::SunFlag);
|
||||
else shade->sendCommand(somfy_commands::Flag);
|
||||
}
|
||||
}
|
||||
|
|
@ -138,6 +138,12 @@ void MQTTClass::receive(const char *topic, byte*payload, uint32_t length) {
|
|||
else
|
||||
group->sendCommand(somfy_commands::My);
|
||||
}
|
||||
else if(strncmp(command, "sunFlag", sizeof(command)) == 0) {
|
||||
if(val > 0)
|
||||
group->sendCommand(somfy_commands::Flag);
|
||||
else
|
||||
group->sendCommand(somfy_commands::SunFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue