Browse Source

Fix device profile update handling by rule node - preserve old key values to correctly update entity keys snapshot

pull/5186/head
Igor Kulikov 5 years ago
parent
commit
8838a48bd1
  1. 2
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/profile/DeviceState.java

2
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/profile/DeviceState.java

@ -100,7 +100,7 @@ class DeviceState {
}
public void updateProfile(TbContext ctx, DeviceProfile deviceProfile) throws ExecutionException, InterruptedException {
Set<AlarmConditionFilterKey> oldKeys = this.deviceProfile.getEntityKeys();
Set<AlarmConditionFilterKey> oldKeys = Set.copyOf(this.deviceProfile.getEntityKeys());
this.deviceProfile.updateDeviceProfile(deviceProfile);
if (latestValues != null) {
Set<AlarmConditionFilterKey> keysToFetch = new HashSet<>(this.deviceProfile.getEntityKeys());

Loading…
Cancel
Save