CHANGE: added publish topic functions
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { iMQTTEntityBase, MQTTEntity } from './mqtt_base';
|
||||
import { MQTTEntity } from './mqtt_base';
|
||||
|
||||
export class MqttLight extends MQTTEntity {
|
||||
pl_on: string = '1';
|
||||
@@ -45,4 +45,12 @@ export class MqttLight extends MQTTEntity {
|
||||
override get uniq_id() {
|
||||
return this._uniq_id;
|
||||
}
|
||||
|
||||
override publish_topics(index: number = 1): string[] {
|
||||
return [
|
||||
`String stat_topic_${index} = "${this.stat_t}";`,
|
||||
`String cmd_topic_${index} = "${this.cmd_t}";`,
|
||||
`String bri_cmd_topic_${index} = "${this.bri_cmd_t}";`,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user