@@ -369,7 +369,7 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint)
369
369
/*
370
370
* @brief
371
371
* This function is used to update the current level attribute
372
- * while respecting it's defined quiet reporting quality:
372
+ * while respecting its defined quiet reporting quality:
373
373
* The attribute will be reported:
374
374
* - At most once per second, or
375
375
* - At the start of the movement/transition, or
@@ -386,8 +386,7 @@ static Status SetCurrentLevelQuietReport(EndpointId endpoint, EmberAfLevelContro
386
386
DataModel::Nullable<uint8_t > newValue, bool isStartOrEndOfTransition)
387
387
{
388
388
AttributeDirtyState dirtyState;
389
- MarkAttributeDirty markDirty = MarkAttributeDirty::kNo ;
390
- auto now = System::SystemClock ().GetMonotonicTimestamp ();
389
+ auto now = System::SystemClock ().GetMonotonicTimestamp ();
391
390
392
391
if (isStartOrEndOfTransition)
393
392
{
@@ -406,9 +405,10 @@ static Status SetCurrentLevelQuietReport(EndpointId endpoint, EmberAfLevelContro
406
405
dirtyState = state->quietCurrentLevel .SetValue (newValue, now, predicate);
407
406
}
408
407
408
+ MarkAttributeDirty markDirty = MarkAttributeDirty::kNo ;
409
409
if (dirtyState == AttributeDirtyState::kMustReport )
410
410
{
411
- markDirty = MarkAttributeDirty::kIfChanged ;
411
+ markDirty = MarkAttributeDirty::kYes ;
412
412
}
413
413
return Attributes::CurrentLevel::Set (endpoint, state->quietCurrentLevel .value (), markDirty);
414
414
}
@@ -542,7 +542,7 @@ static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs)
542
542
// - kMarkDirtyOnIncrement : When the value increases.
543
543
if (state->quietRemainingTime .SetValue (remainingTimeDs, now) == AttributeDirtyState::kMustReport )
544
544
{
545
- markDirty = MarkAttributeDirty::kIfChanged ;
545
+ markDirty = MarkAttributeDirty::kYes ;
546
546
}
547
547
548
548
Attributes::RemainingTime::Set (endpoint, state->quietRemainingTime .value ().ValueOr (0 ), markDirty);
0 commit comments