diff --git a/ConfigFile.cpp b/ConfigFile.cpp index c4fb891..197e1c0 100644 --- a/ConfigFile.cpp +++ b/ConfigFile.cpp @@ -360,7 +360,7 @@ bool ShadeConfigFile::writeShadeRecord(SomfyShade *shade) { this->writeUInt32(rem->getRemoteAddress()); } this->writeUInt16(shade->lastRollingCode); - this->writeUInt8(shade->flags); + this->writeUInt8(shade->flags & static_cast(somfy_flags_t::SunFlag)); this->writeFloat(shade->myPos, 5); this->writeFloat(shade->myTiltPos, 5); this->writeFloat(shade->currentPos, 5); diff --git a/Somfy.cpp b/Somfy.cpp index 4bc1623..3c1e4f6 100644 --- a/Somfy.cpp +++ b/Somfy.cpp @@ -1215,6 +1215,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) { case somfy_commands::Flag: this->flags &= ~(static_cast(somfy_flags_t::SunFlag)); + somfy.isDirty = true; this->emitState(); break; case somfy_commands::SunFlag: @@ -1233,6 +1234,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) { this->target = 0.0f; } + somfy.isDirty = true; this->emitState(); } break;