UNPKG

node-red-contrib-voice-assistant

Version:

一个小度-小爱-猫精音箱控制NODE-RED自定义设备的节点

21 lines (20 loc) 623 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * 处理属性基类 */ class BaseAttribute { constructor(model) { this.service = 'turn_on'; this.domain = model.domain; this.model = model; this.state = model.state; this.attributes = model.attributes; this.service_data = {}; } callServiceTpl() { this.service_data.entity_id = this.model.entity_id; return { id: Date.now(), service: 'turn_on', type: 'call_service', domain: this.domain, service_data: this.service_data }; } } exports.default = BaseAttribute;