UNPKG

nest-cli

Version:

Unofficial command-line tool to control Nest devices

20 lines (15 loc) 452 B
'use strict'; const SetStateTask = require('../tasks/state'); const readThermostatId = require('../utils/read-thermostat-id'); module.exports = { name: 'state <mode> [thermostatId]', alias: 's', description: 'available modes: cool, heat, heat-cool, off', run: readThermostatId(function(mode, thermostatId) { const task = new SetStateTask({ app: this.app, ui: this.ui }); return task.run(thermostatId, mode); }) };