export of thermostat and windowcontact

This commit is contained in:
Wolfgang Hottgenroth
2018-01-16 21:06:00 +01:00
parent 72731b74b7
commit 1847db3934
4 changed files with 56 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { mqttHandler } from './MqttDispatcher'
import { HasInTopic } from './AItem'
import { AHomematicItem } from './AHomematicItem'
import { MaxWindowContact } from './MaxWindowContact';
// import { SwitchExport, ExportType } from './Export'
import { ThermostatExport, ExportType } from './Export'
const WINDOW_OPEN_TEMPERATURE = 4.5
@ -27,6 +27,10 @@ export class MaxThermostat extends AHomematicItem implements HasInTopic {
return this.temperatureTopic
}
exportItem() : ExportType|null {
return ThermostatExport(this.itemId, this.label, this.temperatureTopic, this.temperatureFeedbackTopic)
}
constructor(floor: string, room: string, item: string, label: string, hmId: number, windowContacts: MaxWindowContact[]) {
super(floor, room, item, label, hmId)
this.temperatureTopic = `${this.topicFirstPart}/temperature`