interface

This commit is contained in:
Wolfgang Hottgenroth
2018-01-27 17:47:52 +01:00
parent 3188efac5f
commit 1e3823b2a5

View File

@ -2,8 +2,9 @@ import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomegearItem } from './AHomegearItem'
import { HueColorLightExport, ExportType } from './Export'
import { HasStateAndFeedbackTopic, HasInTopic } from './AItem'
export class HueColorBulbItem extends AHomegearItem {
export class HueColorBulbItem extends AHomegearItem implements HasStateAndFeedbackTopic{
private bright: number
private colorTemperature: number
private hue: number
@ -25,6 +26,18 @@ export class HueColorBulbItem extends AHomegearItem {
private saturationTopic: string
private colorTemperatureTopic: string
getStateTopic() : string {
return this.stateTopic
}
getInTopic() : string {
return this.stateTopic
}
getStateFeedbackTopic() : string {
return this.stateFeedbackTopic
}
constructor(floor: string, room: string, item: string, label: string, hmId: number) {
super(floor, room, item, label, hmId)
this.stateTopic = `${this.topicFirstPart}/state`