const SceneManager = function SceneManager(stateManager, event, device, message, variable) { this.stateManager = stateManager; this.event = event; this.device = device; this.message = message; this.variable = variable; this.scenes = {}; this.timezone = DEFAULT_TIMEZONE; // @ts-ignore this.queue = queue({ autostart: true, }); this.event.on(EVENTS.TRIGGERS.CHECK, eventFunctionWrapper(this.checkTrigger.bind(this))); this.event.on(EVENTS.ACTION.TRIGGERED, eventFunctionWrapper(this.executeSingleAction.bind(this))); // on timezone change, reload all scenes this.event.on(EVENTS.SYSTEM.TIMEZONE_CHANGED, eventFunctionWrapper(this.init.bind(this))); }
function render(ds, referer, term, focusTarget) { const queue = require('queue'); var q = queue(); q.autostart = true; if (term) {
const SceneManager = function SceneManager(stateManager, event, device, message, variable) { this.stateManager = stateManager; this.event = event; this.device = device; this.message = message; this.variable = variable; this.scenes = {}; this.timezone = DEFAULT_TIMEZONE; // @ts-ignore this.queue = queue({ autostart: true, }); this.event.on(EVENTS.TRIGGERS.CHECK, eventFunctionWrapper(this.checkTrigger.bind(this))); this.event.on(EVENTS.ACTION.TRIGGERED, eventFunctionWrapper(this.executeSingleAction.bind(this))); // on timezone change, reload all scenes this.event.on(EVENTS.SYSTEM.TIMEZONE_CHANGED, eventFunctionWrapper(this.init.bind(this))); }