Skip to content

Commit

Permalink
Fix DecimalType hex conversion example
Browse files Browse the repository at this point in the history
See: openhab/openhab-core#1526

Signed-off-by: Wouter Born <github@maindrain.net>
  • Loading branch information
wborn committed Jun 20, 2020
1 parent a4bf707 commit 00c3fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configuration/rules-dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ var MyNumber = Integer.parseInt(hex_code, 16) as Number
var MyNumber = Long.parseLong(hex, 16) as Number

// coverting hex_code into DecimalType
var DecimalType parsedResult = DecimalType.valueOf(Long.parseLong(hex_code, 16).toString);
var DecimalType parsedResult = new DecimalType(Long.parseLong(hex_code, 16));
```

* For QuantityType states:
Expand Down

0 comments on commit 00c3fb5

Please sign in to comment.