mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 21:04:54 +00:00
Implement Flush Mounted Presence Sensor Routine Control and change the device type logic
This commit is contained in:
@ -94,6 +94,8 @@ class CreateSceneModel {
|
||||
}
|
||||
|
||||
class CreateSceneAction {
|
||||
final String? productType;
|
||||
|
||||
String entityId;
|
||||
String? actionType;
|
||||
String actionExecutor;
|
||||
@ -104,15 +106,18 @@ class CreateSceneAction {
|
||||
required this.entityId,
|
||||
required this.actionExecutor,
|
||||
required this.executorProperty,
|
||||
required this.productType,
|
||||
});
|
||||
|
||||
CreateSceneAction copyWith({
|
||||
String? productType,
|
||||
String? actionType,
|
||||
String? entityId,
|
||||
String? actionExecutor,
|
||||
CreateSceneExecutorProperty? executorProperty,
|
||||
}) {
|
||||
return CreateSceneAction(
|
||||
productType: productType,
|
||||
actionType: actionType,
|
||||
entityId: entityId ?? this.entityId,
|
||||
actionExecutor: actionExecutor ?? this.actionExecutor,
|
||||
@ -126,18 +131,21 @@ class CreateSceneAction {
|
||||
'entityId': entityId,
|
||||
'actionExecutor': actionExecutor,
|
||||
'executorProperty': executorProperty?.toMap(actionExecutor),
|
||||
// 'productType': productType,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
"actionType": actionType,
|
||||
'entityId': entityId,
|
||||
'actionExecutor': actionExecutor,
|
||||
// 'productType': productType,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
factory CreateSceneAction.fromMap(Map<String, dynamic> map) {
|
||||
return CreateSceneAction(
|
||||
productType: map['productType'] ?? '',
|
||||
entityId: map['entityId'] ?? '',
|
||||
actionExecutor: map['actionExecutor'] ?? '',
|
||||
executorProperty:
|
||||
|
||||
Reference in New Issue
Block a user