Add MQTT processing for MyTiltPos

This commit is contained in:
Robert Strouse 2023-06-10 10:43:16 -07:00
parent 23ff39092f
commit 9d08a1c618
2 changed files with 4 additions and 0 deletions

View file

@ -99,6 +99,10 @@ void MQTTClass::receive(const char *topic, byte*payload, uint32_t length) {
if(val >= 0 && val <= 100)
shade->setMyPosition(val);
}
else if(strncmp(command, "myTiltPos", sizeof(command)) == 0) {
if(val >= 0 && val <= 100)
shade->setMyPosition(shade->myPos, val);
}
else if(strncmp(command, "sunFlag", sizeof(command)) == 0) {
if(val >= 0) shade->sendCommand(somfy_commands::SunFlag);
else shade->sendCommand(somfy_commands::Flag);

Binary file not shown.