18 lines
602 B
TypeScript
18 lines
602 B
TypeScript
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}`;
|
|
}
|
|
}
|
|
|