toggleDevice method

Future<bool> toggleDevice({
  1. required String deviceId,
  2. int channel = 1,
})

Toggle the device

Implementation

Future<bool> toggleDevice({
  required String deviceId,
  int channel = 1,
}) async {
  return setDevicePowerState(
    deviceId: deviceId,
    state: 'toggle',
    channel: channel,
  );
}