Kellerlicht
This commit is contained in:
7
dist/HomematicSwitchItem.js
vendored
7
dist/HomematicSwitchItem.js
vendored
@ -10,12 +10,13 @@ class HomematicSwitchItem extends AHomegearItem_1.AHomegearItem {
|
|||||||
getStateFeedbackTopic() {
|
getStateFeedbackTopic() {
|
||||||
return this.stateFeedbackTopic;
|
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);
|
super(floor, room, item, label, hmId);
|
||||||
|
this.partId = partId;
|
||||||
this.stateTopic = `${this.topicFirstPart}/state`;
|
this.stateTopic = `${this.topicFirstPart}/state`;
|
||||||
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
|
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
|
||||||
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`;
|
this.deviceFeedbackTopic = `${this.deviceTopicPre}/${this.partId}/STATE`;
|
||||||
this.actionTopic = `${this.actionTopicPre}/1/STATE`;
|
this.actionTopic = `${this.actionTopicPre}/${this.partId}/STATE`;
|
||||||
this.subscribeTopics = [
|
this.subscribeTopics = [
|
||||||
this.stateTopic,
|
this.stateTopic,
|
||||||
this.deviceFeedbackTopic
|
this.deviceFeedbackTopic
|
||||||
|
8
dist/main.js
vendored
8
dist/main.js
vendored
@ -363,6 +363,14 @@ let workshopLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Works
|
|||||||
workshopLight.start();
|
workshopLight.start();
|
||||||
allLabeledItems.push(workshopLight);
|
allLabeledItems.push(workshopLight);
|
||||||
allRelevantLights.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");
|
let twoLedSignal1 = new TwoLedSignal_1.TwoLedSignal('Gnd', 'Hallway', 'TwoLedSignal1', 'Licht- und Fenster-Anzeiger', allRelevantLights, "OFF", "ON", allWindows, "CLOSED", "OPEN");
|
||||||
twoLedSignal1.start();
|
twoLedSignal1.start();
|
||||||
|
@ -12,6 +12,7 @@ export class HomematicSwitchItem extends AHomegearItem implements HasStateAndFee
|
|||||||
private stateFeedbackTopic: string
|
private stateFeedbackTopic: string
|
||||||
private stateTopic: string
|
private stateTopic: string
|
||||||
private type: string
|
private type: string
|
||||||
|
private partId: number
|
||||||
|
|
||||||
getStateTopic() : string {
|
getStateTopic() : string {
|
||||||
return this.stateTopic
|
return this.stateTopic
|
||||||
@ -21,12 +22,13 @@ export class HomematicSwitchItem extends AHomegearItem implements HasStateAndFee
|
|||||||
return this.stateFeedbackTopic
|
return this.stateFeedbackTopic
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(floor: string, room: string, item: string, label: string, hmId: number, type: string = 'bulb') {
|
constructor(floor: string, room: string, item: string, label: string, hmId: number, partId: number = 1, type: string = 'bulb') {
|
||||||
super(floor, room, item, label, hmId)
|
super(floor, room, item, label, hmId)
|
||||||
|
this.partId = partId
|
||||||
this.stateTopic = `${this.topicFirstPart}/state`
|
this.stateTopic = `${this.topicFirstPart}/state`
|
||||||
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
|
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
|
||||||
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`
|
this.deviceFeedbackTopic = `${this.deviceTopicPre}/${this.partId}/STATE`
|
||||||
this.actionTopic = `${this.actionTopicPre}/1/STATE`
|
this.actionTopic = `${this.actionTopicPre}/${this.partId}/STATE`
|
||||||
this.subscribeTopics = [
|
this.subscribeTopics = [
|
||||||
this.stateTopic,
|
this.stateTopic,
|
||||||
this.deviceFeedbackTopic
|
this.deviceFeedbackTopic
|
||||||
|
10
src/main.ts
10
src/main.ts
@ -454,6 +454,16 @@ workshopLight.start()
|
|||||||
allLabeledItems.push(workshopLight)
|
allLabeledItems.push(workshopLight)
|
||||||
allRelevantLights.push(workshopLight)
|
allRelevantLights.push(workshopLight)
|
||||||
|
|
||||||
|
let basementSmallLight = new HomematicSwitchItem('Base', 'Hallway', 'SmallLight', 'Licht Keller einfach', 35, 1)
|
||||||
|
basementSmallLight.start()
|
||||||
|
allLabeledItems.push(basementSmallLight)
|
||||||
|
allRelevantLights.push(basementSmallLight)
|
||||||
|
|
||||||
|
let basementLargeLight = new HomematicSwitchItem('Base', 'Hallway', 'LargeLight', 'Licht Keller hell', 35, 2)
|
||||||
|
basementLargeLight.start()
|
||||||
|
allLabeledItems.push(basementLargeLight)
|
||||||
|
allRelevantLights.push(basementLargeLight)
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------------------
|
||||||
let twoLedSignal1 = new TwoLedSignal('Gnd', 'Hallway', 'TwoLedSignal1', 'Licht- und Fenster-Anzeiger',
|
let twoLedSignal1 = new TwoLedSignal('Gnd', 'Hallway', 'TwoLedSignal1', 'Licht- und Fenster-Anzeiger',
|
||||||
|
Reference in New Issue
Block a user