base class and m433switch
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
let logger = require('./log');
|
||||
let mqtt = require('./mqttHandler');
|
||||
let AItem = require('./AItem')
|
||||
|
||||
|
||||
|
||||
class HomematicDimmerItem {
|
||||
constructor(itemId, actionTopic) {
|
||||
this.itemId = itemId;
|
||||
this.stateTopic = `dispatcher_ng/items/${this.itemId}/state`;
|
||||
this.brightTopic = `dispatcher_ng/items/${this.itemId}/bright`;
|
||||
this.stateFeedbackTopic = `dispatcher_ng/items/${this.itemId}/state/feedback`;
|
||||
this.brightFeedbackTopic = `dispatcher_ng/items/${this.itemId}/bright/feedback`;
|
||||
class HomematicDimmerItem extends AItem {
|
||||
constructor(floor, room, item, actionTopic) {
|
||||
super(floor, room, item);
|
||||
this.stateTopic = `${this.topicFirstPart}/state`;
|
||||
this.brightTopic = `${this.topicFirstPart}/bright`;
|
||||
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
|
||||
this.brightFeedbackTopic = `${this.topicFirstPart}/bright/feedback`;
|
||||
this.actionTopic = actionTopic;
|
||||
this.state = 'OFF';
|
||||
this.oldState = undefined;
|
||||
|
Reference in New Issue
Block a user