doozScenarioSet method

Future<DoozScenarioStatusData?> doozScenarioSet(
  1. int address,
  2. int scenarioId,
  3. int correlation, {
  4. int command = 0,
  5. int io = 0,
  6. bool isActive = true,
  7. int unused = 0,
  8. int value = 0,
  9. int transition = 0,
  10. int startAt = 0x7F,
  11. int duration = 0x7F,
  12. int daysInWeek = 0x7F,
  13. int? extra,
  14. int keyIndex = 0,
})

Will send a DoozScenarioSet message (0x8219). Defaults to a scenario that apply a level 0 (OFF cmd with lights).

(DooZ specific API)

Implementation

Future<DoozScenarioStatusData?> doozScenarioSet(
  int address,
  int scenarioId,
  int correlation, {
  int command = 0,
  int io = 0,
  bool isActive = true,
  int unused = 0,
  int value = 0,
  int transition = 0,
  int startAt = 0x7F,
  int duration = 0x7F,
  int daysInWeek = 0x7F,
  int? extra,
  int keyIndex = 0,
}) async {
  // if (Platform.isAndroid /* || Platform.isIOS */) {
  //   final status = _onDoozScenarioStatusController.stream.cast<DoozScenarioStatusData?>().firstWhere(
  //         (element) => element!.source == address,
  //         orElse: () => null,
  //       );
  //   await _methodChannel.invokeMethod('doozScenarioSet', {
  //     'address': address,
  //     'scenarioId': scenarioId,
  //     'command': command,
  //     'io': io,
  //     'isActive': isActive,
  //     'unused': unused,
  //     'value': value,
  //     'transition': transition,
  //     'startAt': startAt,
  //     'duration': duration,
  //     'daysInWeek': daysInWeek,
  //     'extra': extra,
  //     'correlation': correlation,
  //     'keyIndex': keyIndex,
  //   });
  //   return status;
  // } else {
  throw UnimplementedError('${Platform.environment} not supported');
  // }
}