Skip to content

Commit 373f1f0

Browse files
committed
Fix external slider updates
While I'm not following the logic in that code path, the idea seems to be that it should do an early return if the new value was not processed yet. And all that is fine, except that it was using `last_changed` instead of `last_updated`. For lights, it means that it only reacted to lights being turned on or off, not when the brightness was changing. Resolves Clooos#1367.
1 parent 287e841 commit 373f1f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/slider/changes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function getCurrentValue(context, entity, entityType) {
7777

7878
// Check for pending value and if it's still valid
7979
if (pendingValue) {
80-
const lastChanged = new Date(currentState.last_changed).getTime();
80+
const lastChanged = new Date(currentState.last_updated).getTime();
8181
if (lastChanged < pendingValue.timestamp) {
8282
return pendingValue.percentage;
8383
}

0 commit comments

Comments
 (0)