Better DPT237.

Add tests for 21, 237.
This commit is contained in:
2022-03-12 15:56:39 +01:00
parent 123bd0c0ba
commit fe6751a771
3 changed files with 81 additions and 2 deletions

View File

@@ -61,6 +61,10 @@ export class DPT237 implements DPT {
if (value === undefined || value === null)
throw new InvalidValueError('Cannot write null value');
if (value.daliAddress < 0 || value.daliAddress > 63)
throw new InvalidValueError(`daliAddress must be between [0, 63]. git ${value.daliAddress}`);
// LSB
let LSB = (value.readResponse === false ? "0" : "1") +
(value.addressIndicator === false ? "0" : "1") +