mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Add MQTT processing for MyTiltPos
This commit is contained in:
parent
23ff39092f
commit
9d08a1c618
2 changed files with 4 additions and 0 deletions
4
MQTT.cpp
4
MQTT.cpp
|
|
@ -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.
Loading…
Add table
Add a link
Reference in a new issue