This commit is contained in:
Wolfgang Hottgenroth
2018-01-31 21:24:42 +01:00
parent 48fe3be0e9
commit f6db2369c3
2 changed files with 12 additions and 4 deletions

View File

@ -1,9 +1,8 @@
import { AItem } from './AItem'
import { AItem, HasInTopic } from './AItem'
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
export class DimmerAdaptor extends AItem {
export class DimmerAdaptor extends AItem implements HasInTopic {
private brightDirection: number
private bright: number
private state: string
@ -22,6 +21,11 @@ export class DimmerAdaptor extends AItem {
this.brightDirection = -1
}
getInTopic() : string {
return this.inTopic
}
processMessage(topic: string, payload: string) : void {
switch (topic) {
case this.inTopic: