can now have multiple triggers

+ Pattern.log now makes sense
This commit is contained in:
Felix Roos 2022-11-12 16:52:00 +01:00
parent 27fb2d2d5b
commit ff5d14fb63
9 changed files with 32 additions and 22 deletions

View file

@ -85,9 +85,13 @@ export class Hap {
);
}
showWhole() {
showWhole(compact = false) {
return `${this.whole == undefined ? '~' : this.whole.show()}: ${
typeof this.value === 'object' ? JSON.stringify(this.value) : this.value
typeof this.value === 'object'
? compact
? JSON.stringify(this.value).slice(1, -1).replaceAll('"', '').replaceAll(',', ' ')
: JSON.stringify(this.value)
: this.value
}`;
}