mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 16:04:54 +00:00
Implement Flush Mounted Presence Sensor Routine Control and change the device type logic
This commit is contained in:
@ -26,20 +26,20 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
Widget build(BuildContext context) {
|
||||
final device = (ModalRoute.of(context)?.settings.arguments as Map)['device']
|
||||
as DeviceModel;
|
||||
|
||||
final isAutomation = (ModalRoute.of(context)?.settings.arguments
|
||||
as Map)['isAutomationDeviceStatus'] as bool;
|
||||
|
||||
List<SceneStaticFunction> functions = [];
|
||||
if (device.functions.isNotEmpty) {
|
||||
functions = getFunctionsWithIcons(
|
||||
type: device.productType,
|
||||
functions: device.functions,
|
||||
deviceId: device.uuid ?? '',
|
||||
deviceName: device.name ?? '',
|
||||
isAutomation: isAutomation,
|
||||
);
|
||||
}
|
||||
// if (device.functions.isNotEmpty) {
|
||||
functions = getFunctionsWithIcons(
|
||||
productType: device.type ?? '',
|
||||
type: device.productType,
|
||||
functions: device.functions,
|
||||
deviceId: device.uuid ?? '',
|
||||
deviceName: device.name ?? '',
|
||||
isAutomation: isAutomation,
|
||||
);
|
||||
// }
|
||||
|
||||
return DefaultScaffold(
|
||||
title: getTitle(type: device.productType),
|
||||
@ -257,7 +257,7 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
deviceName: device.name ?? '',
|
||||
uniqueId: function.uniqueCustomId!,
|
||||
operationType: function.operationDialogType,
|
||||
deviceType: '',
|
||||
deviceType: function.deviceType!,
|
||||
));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
@ -298,7 +298,7 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
return;
|
||||
}
|
||||
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
||||
deviceType: device.productType!.name,
|
||||
deviceType: function.deviceType!,
|
||||
deviceControlModel: DeviceControlModel(
|
||||
deviceId: device.uuid,
|
||||
code: function.code,
|
||||
|
||||
Reference in New Issue
Block a user