Kellerlicht

This commit is contained in:
2018-05-24 22:09:35 +02:00
parent 7e2fb7edea
commit ab08986ca2
4 changed files with 27 additions and 6 deletions

View File

@ -10,12 +10,13 @@ class HomematicSwitchItem extends AHomegearItem_1.AHomegearItem {
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
constructor(floor, room, item, label, hmId, type = 'bulb') {
constructor(floor, room, item, label, hmId, partId = 1, type = 'bulb') {
super(floor, room, item, label, hmId);
this.partId = partId;
this.stateTopic = `${this.topicFirstPart}/state`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`;
this.actionTopic = `${this.actionTopicPre}/1/STATE`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/${this.partId}/STATE`;
this.actionTopic = `${this.actionTopicPre}/${this.partId}/STATE`;
this.subscribeTopics = [
this.stateTopic,
this.deviceFeedbackTopic

8
dist/main.js vendored
View File

@ -363,6 +363,14 @@ let workshopLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Works
workshopLight.start();
allLabeledItems.push(workshopLight);
allRelevantLights.push(workshopLight);
let basementSmallLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Hallway', 'SmallLight', 'Licht Keller einfach', 35, 1);
basementSmallLight.start();
allLabeledItems.push(basementSmallLight);
allRelevantLights.push(basementSmallLight);
let basementLargeLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Hallway', 'LargeLight', 'Licht Keller hell', 35, 2);
basementLargeLight.start();
allLabeledItems.push(basementLargeLight);
allRelevantLights.push(basementLargeLight);
// ----------------------------------------------------------------------------------------------------------
let twoLedSignal1 = new TwoLedSignal_1.TwoLedSignal('Gnd', 'Hallway', 'TwoLedSignal1', 'Licht- und Fenster-Anzeiger', allRelevantLights, "OFF", "ON", allWindows, "CLOSED", "OPEN");
twoLedSignal1.start();