mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
SP-1441 rework.
This commit is contained in:
@ -74,11 +74,33 @@ class ACHelper {
|
||||
child: _buildFunctionsList(
|
||||
context: context,
|
||||
acFunctions: acFunctions,
|
||||
onFunctionSelected: (functionCode, operationName) =>
|
||||
context.read<FunctionBloc>().add(SelectFunction(
|
||||
device: device,
|
||||
onFunctionSelected: (functionCode, operationName) {
|
||||
context.read<FunctionBloc>().add(
|
||||
SelectFunction(
|
||||
functionCode: functionCode,
|
||||
operationName: operationName,
|
||||
)),
|
||||
),
|
||||
);
|
||||
if (functionCode == 'temp_set' ||
|
||||
functionCode == 'temp_current') {
|
||||
context.read<FunctionBloc>().add(
|
||||
AddFunction(
|
||||
functionData: DeviceFunctionData(
|
||||
entityId: device?.uuid ?? '',
|
||||
functionCode: functionCode,
|
||||
operationName: operationName,
|
||||
value: functionCode == 'temp_set'
|
||||
? 200
|
||||
: -100,
|
||||
condition: '==',
|
||||
valueDescription: selectedFunctionData
|
||||
.valueDescription,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
// Value selector
|
||||
@ -137,6 +159,7 @@ class ACHelper {
|
||||
required BuildContext context,
|
||||
required List<ACFunction> acFunctions,
|
||||
required Function(String, String) onFunctionSelected,
|
||||
required AllDevicesModel? device,
|
||||
}) {
|
||||
return ListView.separated(
|
||||
shrinkWrap: false,
|
||||
|
Reference in New Issue
Block a user