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

@ -1,7 +1,7 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomematicItem } from './AHomematicItem'
// import { SwitchExport, ExportType } from './Export'
import { ContactExport, ExportType } from './Export'
export class MaxWindowContact extends AHomematicItem {
private deviceFeedbackTopic: string
@ -24,6 +24,10 @@ export class MaxWindowContact extends AHomematicItem {
]
}
exportItem() : ExportType|null {
return ContactExport(this.itemId, this.label, this.stateFeedbackTopic)
}
processMessage(topic: string, payload: string) : void {
if (payload == 'true') {
this.state = 'OPEN'