actionType automation

This commit is contained in:
mohammad
2024-12-02 14:27:47 +03:00
parent 2e92861b7a
commit 2ac8128eff
2 changed files with 14 additions and 3 deletions

View File

@ -99,6 +99,9 @@ mixin SceneLogicHelper {
}
if (task.code == CreateSceneEnum.smartSceneSelect.name) {
return CreateSceneAction(
actionType: task.operationName.toLowerCase() == 'automation'
? 'automation'
: 'scene',
entityId: actions[index].deviceId,
actionExecutor: actions[index].functionValue,
executorProperty: null);
@ -173,21 +176,24 @@ mixin SceneLogicHelper {
}
}
Widget getTheCorrectDialogBody(SceneStaticFunction taskItem, dynamic functionValue,
Widget getTheCorrectDialogBody(
SceneStaticFunction taskItem, dynamic functionValue,
{required bool isAutomation}) {
if (taskItem.operationDialogType == OperationDialogType.temperature) {
return AlertDialogTemperatureBody(
taskItem: taskItem,
functionValue: functionValue ?? taskItem.functionValue,
);
} else if ((taskItem.operationDialogType == OperationDialogType.countdown) ||
} else if ((taskItem.operationDialogType ==
OperationDialogType.countdown) ||
(taskItem.operationDialogType == OperationDialogType.delay)) {
return AlertDialogCountdown(
durationValue: taskItem.functionValue ?? 0,
functionValue: functionValue ?? taskItem.functionValue,
function: taskItem,
);
} else if (taskItem.operationDialogType == OperationDialogType.integerSteps) {
} else if (taskItem.operationDialogType ==
OperationDialogType.integerSteps) {
return AlertDialogSliderSteps(
taskItem: taskItem,
functionValue: functionValue ?? taskItem.functionValue,