mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
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:
parent
b51292889f
commit
d85b3d30c8
4 changed files with 11 additions and 6 deletions
|
|
@ -240,6 +240,11 @@ static void test_command_names_round_trip() {
|
|||
}
|
||||
TEST_ASSERT_EQUAL_STRING_MESSAGE("", failed.c_str(), "These names don't parse back to their command");
|
||||
}
|
||||
static void test_sun_flag_command() {
|
||||
// sunFlag/set 1 must turn the flag on for shades and groups alike.
|
||||
TEST_ASSERT_EQUAL_UINT8((uint8_t)somfy_commands::SunFlag, (uint8_t)sunFlagCommand(true));
|
||||
TEST_ASSERT_EQUAL_UINT8((uint8_t)somfy_commands::Flag, (uint8_t)sunFlagCommand(false));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void)argc;
|
||||
|
|
@ -262,5 +267,6 @@ int main(int argc, char **argv) {
|
|||
RUN_TEST(test_parse_command_names);
|
||||
RUN_TEST(test_command_display_names);
|
||||
RUN_TEST(test_command_names_round_trip);
|
||||
RUN_TEST(test_sun_flag_command);
|
||||
return UNITY_END();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue