first Hue light

This commit is contained in:
Wolfgang Hottgenroth
2018-01-25 16:23:06 +01:00
parent 32a57408d9
commit 11c3def220
18 changed files with 162 additions and 25 deletions

17
src/AHomegearItem.ts Normal file
View File

@ -0,0 +1,17 @@
import { AItem } from './AItem'
export abstract class AHomegearItem extends AItem {
protected deviceTopicPre: string;
protected actionTopicPre: string;
protected homegearTopicPre: string;
protected hmId: number;
constructor(floor: string, room: string, item: string, label: string, hmId: number) {
super(floor, room, item, label);
this.hmId = hmId;
this.homegearTopicPre = 'homegear/instance1';
this.actionTopicPre = `${this.homegearTopicPre}/set/${this.hmId}`;
this.deviceTopicPre = `${this.homegearTopicPre}/plain/${this.hmId}`;
}
}