100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Bug fix for when-then rules with action on boolean attribute
Rich Turner56e17b318c01
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.tsindex 03ed296f8..a856f23bc 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts@@ -105,7 +105,7 @@ export class OrRuleActionAttribute extends translate(i18next)(LitElement) {idOptions.push(...this._assets!.map((asset) => [asset.id!, asset.name!] as [string, string]));const asset = idValue && idValue !== "*" ? this._assets.find(a => a.id === idValue) : undefined;- const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(assetType, this.action.attributeName);+ const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(assetType, this.action.attributeName, asset && asset.attributes && this.action.attributeName ? asset.attributes[this.action.attributeName] : undefined);// Only RW attributes can be used in actionslet attributes: [string, string][] = [];