CHANGE: removed some defaults in basemodel, to create less in toJSON
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import { MQTTEntity } from './mqtt_base';
|
import { MQTTEntity } from './mqtt_base';
|
||||||
|
|
||||||
export class MqttLight extends MQTTEntity {
|
export class MqttLight extends MQTTEntity {
|
||||||
pl_on: string = '1';
|
pl_on: string = '';
|
||||||
pl_off: string = '0';
|
pl_off: string = '';
|
||||||
val_tpl: string = '';
|
val_tpl: string = '';
|
||||||
bri_cmd_t: string = 'brightness/command/topic';
|
bri_cmd_t: string = 'brightness/command/topic';
|
||||||
_cmd_t: string = 'command/topic';
|
_cmd_t: string = 'command/topic';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { iMQTTEntityBase, MQTTEntity } from './mqtt_base';
|
import { iMQTTEntityBase, MQTTEntity } from './mqtt_base';
|
||||||
|
|
||||||
export class MqttSensor extends MQTTEntity implements iMqttSensor {
|
export class MqttSensor extends MQTTEntity implements iMqttSensor {
|
||||||
unit_of_meas: string = 'meassure';
|
unit_of_meas: string = '';
|
||||||
override ent_type: string = 'sensor';
|
override ent_type: string = 'sensor';
|
||||||
override attrs: Set<string> = new Set([
|
override attrs: Set<string> = new Set([
|
||||||
'name',
|
'name',
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ export class MqttSwitch extends MQTTEntity {
|
|||||||
|
|
||||||
_dev_cla: DeviceClass = new DeviceClass(['switch', 'outlet']);
|
_dev_cla: DeviceClass = new DeviceClass(['switch', 'outlet']);
|
||||||
cmd_t: string = 'command/topic';
|
cmd_t: string = 'command/topic';
|
||||||
pl_on: string = '1';
|
pl_on: string = '';
|
||||||
pl_off: string = '0';
|
pl_off: string = '';
|
||||||
|
|
||||||
override set name(name: string) {
|
override set name(name: string) {
|
||||||
super.name = name;
|
super.name = name;
|
||||||
|
|||||||
Reference in New Issue
Block a user