fix: turn a group's sun flag on, not off, for MQTT sunFlag 1

groups/+/sunFlag/set sent Flag for 1 and SunFlag for 0, the opposite of the
shade topic.  SunFlag turns the flag on.  Both topics now take the command
from sunFlagCommand() so they can't drift apart again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-12 20:55:21 +02:00
parent b51292889f
commit d85b3d30c8
4 changed files with 11 additions and 6 deletions

View file

@ -103,6 +103,7 @@ somfy_commands flipCommand(somfy_commands cmd) {
return cmd;
}
}
somfy_commands sunFlagCommand(bool on) { return on ? somfy_commands::SunFlag : somfy_commands::Flag; }
byte somfy_frame_t::calc80Checksum(byte b0, byte b1, byte b2) {
byte cs80 = 0;
cs80 = (((b0 & 0xF0) >> 4) ^ ((b1 & 0xF0) >> 4));