Only obay value on item update
This commit is contained in:
parent
4a956d3484
commit
f3fe35e778
1 changed files with 8 additions and 4 deletions
12
remote.html
12
remote.html
|
|
@ -281,11 +281,15 @@
|
||||||
|
|
||||||
if (fullList) {
|
if (fullList) {
|
||||||
items = {}; // Clear existing items
|
items = {}; // Clear existing items
|
||||||
|
json.Data.forEach(item => {
|
||||||
|
items[item.ItemId] = item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
json.Data.forEach(item => {
|
||||||
|
items[item.ItemId].Value = item.Value;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
json.Data.forEach(item => {
|
|
||||||
items[item.ItemId] = item;
|
|
||||||
});
|
|
||||||
|
|
||||||
renderItems();
|
renderItems();
|
||||||
} else if (json.MessageType === 'SensorUpdate') {
|
} else if (json.MessageType === 'SensorUpdate') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue