mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
fix: update every group's flags after a group's sun flag command
A SunFlag or Flag frame makes every group work its flags out again, but the same command from a group only updated that group, so other groups holding the shade kept stale sun flags. The group rule now reports the sensor flags as the frame rule does. Reconcile Q20 in SHADE_BEHAVIOUR_PLAN.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2cf3c4b542
commit
4eff50645d
3 changed files with 9 additions and 4 deletions
|
|
@ -786,6 +786,8 @@ void ShadeBehaviour::onGroupCommand(somfy_commands cmd, uint8_t repeat, uint32_t
|
|||
break;
|
||||
case somfy_commands::Flag:
|
||||
this->p_sunFlag(false);
|
||||
// Every group works its flags out again, as for a Flag frame.
|
||||
this->events.onSensorFlags();
|
||||
if(this->settings.sunSensor) {
|
||||
this->events.onSaveWanted();
|
||||
this->emitState();
|
||||
|
|
@ -803,6 +805,7 @@ void ShadeBehaviour::onGroupCommand(somfy_commands cmd, uint8_t repeat, uint32_t
|
|||
this->applySensorMove(this->sensors.onSunFlag(isSunny, isWindy));
|
||||
this->events.onSaveWanted();
|
||||
this->emitState();
|
||||
this->events.onSensorFlags();
|
||||
}
|
||||
else
|
||||
ESP_LOGW(TAG, "Shade does not have sensor %d", joinShadeFlags(this->settings, false, this->s.stateFlags));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue