mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
29 lines
867 B
Dart
29 lines
867 B
Dart
import 'package:syncrow_web/pages/routiens/models/gang_switches/base_switch_function.dart';
|
|
import 'package:syncrow_web/pages/routiens/models/gang_switches/switch_operational_value.dart';
|
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
|
|
|
class DelayFunction extends BaseSwitchFunction {
|
|
DelayFunction({required super.deviceId, required super.deviceName})
|
|
: super(
|
|
code: 'delay',
|
|
operationName: 'Delay',
|
|
icon: Assets.delay,
|
|
);
|
|
|
|
@override
|
|
List<SwitchOperationalValue> getOperationalValues() => [
|
|
SwitchOperationalValue(
|
|
icon: '',
|
|
description: "Duration in seconds",
|
|
value: 0.0,
|
|
minValue: 0,
|
|
maxValue: 43200,
|
|
stepValue: 1,
|
|
),
|
|
];
|
|
|
|
int convertToSeconds(int hours, int minutes) {
|
|
return (hours * 3600) + (minutes * 60);
|
|
}
|
|
}
|