Cron implemented

This commit is contained in:
Wolfgang Hottgenroth
2018-01-15 17:49:25 +01:00
parent 09a63fe736
commit 9c0ac6dc3b
9 changed files with 107 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { HasInTopic } from './AItem'
import { AHomematicItem } from './AHomematicItem'
import { MaxWindowContact } from './MaxWindowContact';
// import { SwitchExport, ExportType } from './Export'
@ -12,7 +13,7 @@ type WindowContactHolder = {
state : string
}
export class MaxThermostat extends AHomematicItem {
export class MaxThermostat extends AHomematicItem implements HasInTopic {
private actionTopic: string
private deviceFeedbackTopic: string
private temperatureFeedbackTopic: string
@ -22,6 +23,10 @@ export class MaxThermostat extends AHomematicItem {
private windowOpen: boolean
// Thermostat: homegear/instance1/set/3/1/SET_TEMPERATURE
getInTopic() : string {
return this.temperatureTopic
}
constructor(floor: string, room: string, item: string, label: string, hmId: number, windowContacts: MaxWindowContact[]) {
super(floor, room, item, label, hmId)
this.temperatureTopic = `${this.topicFirstPart}/temperature`