Skip to content

Commit

Permalink
fix: set opcua bool via script #1116
Browse files Browse the repository at this point in the history
  • Loading branch information
unocelli committed Apr 16, 2024
1 parent 2596105 commit 6802f43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/runtime/devices/opcua/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ function OpcUAclient(_data, _logger, _events) {
var _toValue = function (type, value) {
switch (type) {
case opcua.DataType.Boolean:
if (value.toLowerCase() === 'true' || value === '1') {
if (typeof value === 'string' && (value.toLowerCase() === 'true' || value === '1')) {
return true;
}
return false;
Expand Down

0 comments on commit 6802f43

Please sign in to comment.