getDevicePowerState
Query for specified device power status.
Usage
const status = await connection.getDevicePowerState('<your device id>');
console.log(status);
// multi-channel devices like Sonoff 4CH
const status = await connection.getDevicePowerState('<your device id>', <channel>);
console.log(status);
* Remember to instantiate class before use
Response example
{
status: 'ok',
state: 'off'
}
Last update on: September 15th, 2019