mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
add water heater device to routine and fix device type in routine
This commit is contained in:
12
assets/icons/refresh_status_icon.svg
Normal file
12
assets/icons/refresh_status_icon.svg
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_7305_15779)">
|
||||||
|
<path d="M17.0872 11.5142C17.0872 13.2025 16.427 14.8021 15.2211 15.9954C14.0278 17.2014 12.4283 17.8615 10.7399 17.8615C9.05141 17.8615 7.45185 17.2014 6.25856 15.9954C5.05262 14.8021 4.39249 13.2025 4.39249 11.5142C4.39249 9.82574 5.05266 8.22618 6.25856 7.03289C7.45185 5.8269 9.05141 5.16681 10.7399 5.16681C11.8063 5.16681 12.8471 5.43337 13.7866 5.95388L11.2984 8.97523H21.0861L18.6486 0L16.2113 2.97053C14.5737 1.91691 12.6948 1.35835 10.7398 1.35835C8.02314 1.35835 5.47142 2.41197 3.55459 4.32888C1.63765 6.24578 0.583984 8.79747 0.583984 11.5142C0.583984 14.2309 1.63765 16.7825 3.55459 18.6994C5.47146 20.6163 8.0231 21.67 10.7398 21.67C13.4565 21.67 16.0082 20.6163 17.925 18.6994C19.8419 16.7825 20.8956 14.2309 20.8956 11.5142V10.8794H17.0872V11.5142Z" fill="#77DD00"/>
|
||||||
|
<path d="M17.0876 10.8799H20.8961V11.5146C20.8961 14.2313 19.8424 16.7829 17.9254 18.6998C16.0086 20.6168 13.4569 21.6704 10.7402 21.6704V17.862C12.4287 17.862 14.0282 17.2019 15.2215 15.9959C16.4275 14.8026 17.0876 13.203 17.0876 11.5147V10.8799H17.0876Z" fill="#66BB00"/>
|
||||||
|
<path d="M13.787 5.95388C12.8475 5.43333 11.8066 5.16681 10.7402 5.16681V1.35835C12.6952 1.35835 14.5741 1.91691 16.2117 2.97057L18.6491 0L21.0866 8.97523H11.2989L13.787 5.95388Z" fill="#66BB00"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_7305_15779">
|
||||||
|
<rect width="21.67" height="21.67" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
@ -178,7 +178,8 @@ class DeviceManagerBloc extends Bloc<DeviceManagerEvent, DeviceManagerState> {
|
|||||||
DeviceType.CeilingSensor,
|
DeviceType.CeilingSensor,
|
||||||
DeviceType.ThreeGang,
|
DeviceType.ThreeGang,
|
||||||
DeviceType.OneGang,
|
DeviceType.OneGang,
|
||||||
DeviceType.TwoGang
|
DeviceType.TwoGang,
|
||||||
|
DeviceType.WH
|
||||||
};
|
};
|
||||||
|
|
||||||
return devices
|
return devices
|
||||||
|
@ -159,6 +159,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
|||||||
// Add new element if it doesn't exist in either list
|
// Add new element if it doesn't exist in either list
|
||||||
if (!updated) {
|
if (!updated) {
|
||||||
var newElement = SceneStaticFunction(
|
var newElement = SceneStaticFunction(
|
||||||
|
deviceType: event.deviceType,
|
||||||
operationName: event.operation,
|
operationName: event.operation,
|
||||||
deviceName: event.deviceName,
|
deviceName: event.deviceName,
|
||||||
icon: event.icon,
|
icon: event.icon,
|
||||||
@ -192,6 +193,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
|||||||
if (element.code == event.deviceControlModel.code) {
|
if (element.code == event.deviceControlModel.code) {
|
||||||
// Update the existing function with new values
|
// Update the existing function with new values
|
||||||
var updatedElement = element.copyWith(
|
var updatedElement = element.copyWith(
|
||||||
|
deviceType: element.deviceType,
|
||||||
operationName: event.operation,
|
operationName: event.operation,
|
||||||
deviceName: event.deviceName,
|
deviceName: event.deviceName,
|
||||||
icon: event.icon,
|
icon: event.icon,
|
||||||
@ -217,6 +219,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
|||||||
}
|
}
|
||||||
if (!updated) {
|
if (!updated) {
|
||||||
var newElement = SceneStaticFunction(
|
var newElement = SceneStaticFunction(
|
||||||
|
deviceType: event.deviceType,
|
||||||
operationName: event.operation,
|
operationName: event.operation,
|
||||||
deviceName: event.deviceName,
|
deviceName: event.deviceName,
|
||||||
icon: event.icon,
|
icon: event.icon,
|
||||||
|
@ -24,6 +24,7 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
|
|||||||
final String uniqueId;
|
final String uniqueId;
|
||||||
final bool? isAutomation;
|
final bool? isAutomation;
|
||||||
final OperationDialogType operationType;
|
final OperationDialogType operationType;
|
||||||
|
final String deviceType;
|
||||||
|
|
||||||
const TempHoldSceneTasksEvent({
|
const TempHoldSceneTasksEvent({
|
||||||
required this.deviceControlModel,
|
required this.deviceControlModel,
|
||||||
@ -34,6 +35,7 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
|
|||||||
required this.uniqueId,
|
required this.uniqueId,
|
||||||
this.isAutomation,
|
this.isAutomation,
|
||||||
required this.operationType,
|
required this.operationType,
|
||||||
|
required this.deviceType,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -46,6 +48,7 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
|
|||||||
uniqueId,
|
uniqueId,
|
||||||
deviceName,
|
deviceName,
|
||||||
icon,
|
icon,
|
||||||
|
deviceType
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +152,8 @@ class FetchSceneTasksEvent extends CreateSceneEvent {
|
|||||||
final String sceneId;
|
final String sceneId;
|
||||||
final bool isAutomation;
|
final bool isAutomation;
|
||||||
|
|
||||||
const FetchSceneTasksEvent({this.isAutomation = false, required this.sceneId});
|
const FetchSceneTasksEvent(
|
||||||
|
{this.isAutomation = false, required this.sceneId});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [sceneId, isAutomation];
|
List<Object> get props => [sceneId, isAutomation];
|
||||||
|
@ -41,6 +41,7 @@ class SmartSceneSelectBloc
|
|||||||
.read<CreateSceneBloc>();
|
.read<CreateSceneBloc>();
|
||||||
|
|
||||||
createSceneBloc.add(TempHoldSceneTasksEvent(
|
createSceneBloc.add(TempHoldSceneTasksEvent(
|
||||||
|
deviceType: '',
|
||||||
deviceControlModel: DeviceControlModel(
|
deviceControlModel: DeviceControlModel(
|
||||||
deviceId: smartSceneEnable?.entityId ?? '',
|
deviceId: smartSceneEnable?.entityId ?? '',
|
||||||
code: CreateSceneEnum.smartSceneSelect.name,
|
code: CreateSceneEnum.smartSceneSelect.name,
|
||||||
|
@ -7,6 +7,7 @@ class OneGangHelperFunctions {
|
|||||||
String deviceId, String deviceName, functionValue) {
|
String deviceId, String deviceName, functionValue) {
|
||||||
return [
|
return [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '1G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -22,6 +23,7 @@ class OneGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '1G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
@ -40,6 +42,7 @@ class OneGangHelperFunctions {
|
|||||||
String deviceId, String deviceName, functionValue) {
|
String deviceId, String deviceName, functionValue) {
|
||||||
return [
|
return [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '1G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -55,6 +58,7 @@ class OneGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '1G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
|
@ -7,6 +7,7 @@ class ThreeGangHelperFunctions {
|
|||||||
String deviceId, String deviceName, functionValue) {
|
String deviceId, String deviceName, functionValue) {
|
||||||
return [
|
return [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -22,6 +23,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
@ -34,6 +36,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -49,6 +52,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
@ -61,6 +65,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -76,6 +81,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
@ -94,6 +100,7 @@ class ThreeGangHelperFunctions {
|
|||||||
String deviceId, String deviceName, functionValue) {
|
String deviceId, String deviceName, functionValue) {
|
||||||
return [
|
return [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -109,6 +116,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
@ -128,6 +136,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -143,6 +152,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
@ -162,6 +172,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -177,6 +188,7 @@ class ThreeGangHelperFunctions {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: '3G',
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
icon: Assets.assetsLightCountdown,
|
icon: Assets.assetsLightCountdown,
|
||||||
|
@ -0,0 +1,124 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
|
class WaterHeaterFunctionsHelper {
|
||||||
|
static List<SceneStaticFunction> waterHeaterHelperFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Reverse Switch',
|
||||||
|
code: 'switch_1',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "Power OFF",
|
||||||
|
value: false),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "Power ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsLightCountdown,
|
||||||
|
operationName: 'CountDown',
|
||||||
|
code: 'countdown_1',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.countdown,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(icon: '', value: 0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<SceneStaticFunction> waterHeaterAutomationFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.refreshStatusIcon,
|
||||||
|
operationName: 'Restart Status',
|
||||||
|
code: 'relay_status',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.none,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "Power OFF",
|
||||||
|
value: 'off',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "Power ON",
|
||||||
|
value: 'on',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.refreshStatusIcon,
|
||||||
|
description: "Restart Memory",
|
||||||
|
value: 'memory',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Switch',
|
||||||
|
code: 'switch_1',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsLightCountdown,
|
||||||
|
operationName: 'CountDown',
|
||||||
|
code: 'countdown_1',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "sec",
|
||||||
|
value: 0.0,
|
||||||
|
minValue: 0,
|
||||||
|
maxValue: 43200,
|
||||||
|
stepValue: 1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsIndicator,
|
||||||
|
operationName: 'Backlight Switch',
|
||||||
|
code: 'switch_backlight',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,7 @@ import 'package:syncrow_app/features/scene/helper/functions_per_device/one_gang_
|
|||||||
import 'package:syncrow_app/features/scene/helper/functions_per_device/presence_sensor.dart';
|
import 'package:syncrow_app/features/scene/helper/functions_per_device/presence_sensor.dart';
|
||||||
import 'package:syncrow_app/features/scene/helper/functions_per_device/three_gang_functions.dart';
|
import 'package:syncrow_app/features/scene/helper/functions_per_device/three_gang_functions.dart';
|
||||||
import 'package:syncrow_app/features/scene/helper/functions_per_device/tow_gang_helper_functions.dart';
|
import 'package:syncrow_app/features/scene/helper/functions_per_device/tow_gang_helper_functions.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/helper/functions_per_device/water_heater_functions.dart';
|
||||||
import 'package:syncrow_app/features/scene/model/scene_details_model.dart';
|
import 'package:syncrow_app/features/scene/model/scene_details_model.dart';
|
||||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
import 'package:syncrow_app/generated/assets.dart';
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
@ -29,6 +30,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
DeviceType.Gateway: gatewayFunctions,
|
DeviceType.Gateway: gatewayFunctions,
|
||||||
DeviceType.OneGang: oneGangFunctions,
|
DeviceType.OneGang: oneGangFunctions,
|
||||||
DeviceType.TwoGang: towGangFunctions,
|
DeviceType.TwoGang: towGangFunctions,
|
||||||
|
DeviceType.WH: waterHeaterFunctions,
|
||||||
};
|
};
|
||||||
|
|
||||||
final Map<DeviceType, String> _titleMap = {
|
final Map<DeviceType, String> _titleMap = {
|
||||||
@ -42,8 +44,23 @@ mixin SceneOperationsDataHelper {
|
|||||||
DeviceType.Gateway: 'Gateway Functions',
|
DeviceType.Gateway: 'Gateway Functions',
|
||||||
DeviceType.OneGang: '1G Light Switch Conditions',
|
DeviceType.OneGang: '1G Light Switch Conditions',
|
||||||
DeviceType.TwoGang: '2G Light Switch Conditions',
|
DeviceType.TwoGang: '2G Light Switch Conditions',
|
||||||
|
DeviceType.WH: 'Water Heater Conditions',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static List<SceneStaticFunction> waterHeaterFunctions(
|
||||||
|
List<FunctionModel> functions,
|
||||||
|
String deviceId,
|
||||||
|
String deviceName,
|
||||||
|
dynamic functionValue,
|
||||||
|
bool isAutomation) {
|
||||||
|
if (isAutomation) {
|
||||||
|
return WaterHeaterFunctionsHelper.waterHeaterAutomationFunctions(
|
||||||
|
deviceId, deviceName, functionValue);
|
||||||
|
}
|
||||||
|
return WaterHeaterFunctionsHelper.waterHeaterHelperFunctions(
|
||||||
|
deviceId, deviceName, functionValue);
|
||||||
|
}
|
||||||
|
|
||||||
//one gang functions
|
//one gang functions
|
||||||
static List<SceneStaticFunction> oneGangFunctions(
|
static List<SceneStaticFunction> oneGangFunctions(
|
||||||
List<FunctionModel> functions,
|
List<FunctionModel> functions,
|
||||||
@ -201,6 +218,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
if (action.entityId == 'delay') {
|
if (action.entityId == 'delay') {
|
||||||
functions.add(
|
functions.add(
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: action.productType,
|
||||||
deviceId: action.entityId,
|
deviceId: action.entityId,
|
||||||
deviceName: 'delay',
|
deviceName: 'delay',
|
||||||
deviceIcon: Assets.delay,
|
deviceIcon: Assets.delay,
|
||||||
@ -222,6 +240,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
// Handle smart scenes
|
// Handle smart scenes
|
||||||
functions.add(
|
functions.add(
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: action.productType,
|
||||||
deviceId: action.entityId,
|
deviceId: action.entityId,
|
||||||
deviceName: action.name.toString(),
|
deviceName: action.name.toString(),
|
||||||
deviceIcon: action.type == 'automation'
|
deviceIcon: action.type == 'automation'
|
||||||
@ -328,6 +347,8 @@ mixin SceneOperationsDataHelper {
|
|||||||
'switch_alarm_sound': _createSwitchAlarmSoundFunction,
|
'switch_alarm_sound': _createSwitchAlarmSoundFunction,
|
||||||
'master_state': _createMasterStateFunction,
|
'master_state': _createMasterStateFunction,
|
||||||
'factory_reset': _createFactoryResetFunction,
|
'factory_reset': _createFactoryResetFunction,
|
||||||
|
'switch_backlight': _createSwitchFunction,
|
||||||
|
'relay_status': _relayStatusSwitchFunction,
|
||||||
};
|
};
|
||||||
|
|
||||||
final functionCode = executorProperty?.functionCode ?? '';
|
final functionCode = executorProperty?.functionCode ?? '';
|
||||||
@ -339,7 +360,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneStaticFunction _createSceneFunction(
|
static SceneStaticFunction _createSceneFunction(
|
||||||
Action action,
|
Action action,
|
||||||
String deviceName,
|
String deviceName,
|
||||||
String icon,
|
String icon,
|
||||||
@ -350,8 +371,11 @@ mixin SceneOperationsDataHelper {
|
|||||||
String? comparator,
|
String? comparator,
|
||||||
String? uniqueCustomId,
|
String? uniqueCustomId,
|
||||||
]) {
|
]) {
|
||||||
|
final productType = action.productType;
|
||||||
|
|
||||||
final functionValue = action.executorProperty?.functionValue;
|
final functionValue = action.executorProperty?.functionValue;
|
||||||
return SceneStaticFunction(
|
return SceneStaticFunction(
|
||||||
|
deviceType: productType,
|
||||||
uniqueCustomId: uniqueCustomId,
|
uniqueCustomId: uniqueCustomId,
|
||||||
deviceId: action.entityId,
|
deviceId: action.entityId,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
@ -422,7 +446,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SceneOperationalValue> _createOnOffOptions() {
|
static List<SceneOperationalValue> _createOnOffOptions() {
|
||||||
return [
|
return [
|
||||||
SceneOperationalValue(
|
SceneOperationalValue(
|
||||||
icon: Assets.assetsAcPower,
|
icon: Assets.assetsAcPower,
|
||||||
@ -744,7 +768,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
action,
|
action,
|
||||||
action.deviceName,
|
action.deviceName,
|
||||||
Assets.assetsIconsAC,
|
Assets.waterHeaterIcon,
|
||||||
'Power',
|
'Power',
|
||||||
OperationDialogType.onOff,
|
OperationDialogType.onOff,
|
||||||
_createOnOffOptions(),
|
_createOnOffOptions(),
|
||||||
@ -754,6 +778,21 @@ mixin SceneOperationsDataHelper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SceneStaticFunction _relayStatusSwitchFunction(Action action,
|
||||||
|
bool isAutomation, String? comparator, String? uniqueCustomId) {
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.waterHeaterIcon,
|
||||||
|
'Restart Status',
|
||||||
|
OperationDialogType.none,
|
||||||
|
_createRelayStatusOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
SceneStaticFunction _createTempSetFunction(Action action, bool isAutomation,
|
SceneStaticFunction _createTempSetFunction(Action action, bool isAutomation,
|
||||||
String? comparator, String? uniqueCustomId) {
|
String? comparator, String? uniqueCustomId) {
|
||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
@ -833,9 +872,22 @@ mixin SceneOperationsDataHelper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneStaticFunction _createSwitch1Function(Action action, bool isAutomation,
|
static SceneStaticFunction _createSwitch1Function(Action action,
|
||||||
String? comparator, String? uniqueCustomId) {
|
bool isAutomation, String? comparator, String? uniqueCustomId) {
|
||||||
switch (action.productType) {
|
switch (action.productType) {
|
||||||
|
case "WH":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.waterHeaterIcon,
|
||||||
|
'Switch',
|
||||||
|
OperationDialogType.onOff,
|
||||||
|
_createOnOffOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
|
|
||||||
case "3G":
|
case "3G":
|
||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
action,
|
action,
|
||||||
@ -872,6 +924,30 @@ mixin SceneOperationsDataHelper {
|
|||||||
comparator,
|
comparator,
|
||||||
uniqueCustomId,
|
uniqueCustomId,
|
||||||
);
|
);
|
||||||
|
case "TwoGang":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.twoGang,
|
||||||
|
'L - Light Switch',
|
||||||
|
OperationDialogType.onOff,
|
||||||
|
_createOnOffOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
|
case "ThreeGang":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.twoGang,
|
||||||
|
'L - Light Switch',
|
||||||
|
OperationDialogType.onOff,
|
||||||
|
_createOnOffOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
action,
|
action,
|
||||||
@ -914,6 +990,30 @@ mixin SceneOperationsDataHelper {
|
|||||||
comparator,
|
comparator,
|
||||||
uniqueCustomId,
|
uniqueCustomId,
|
||||||
);
|
);
|
||||||
|
case "TwoGang":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.twoGang,
|
||||||
|
'R - Light Switch',
|
||||||
|
OperationDialogType.onOff,
|
||||||
|
_createOnOffOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
|
case "ThreeGang":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.twoGang,
|
||||||
|
'M - Light Switch',
|
||||||
|
OperationDialogType.onOff,
|
||||||
|
_createOnOffOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
action,
|
action,
|
||||||
@ -979,12 +1079,28 @@ mixin SceneOperationsDataHelper {
|
|||||||
comparator,
|
comparator,
|
||||||
uniqueCustomId,
|
uniqueCustomId,
|
||||||
);
|
);
|
||||||
|
case "WH":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.waterHeaterIcon,
|
||||||
|
'CountDown',
|
||||||
|
isAutomation
|
||||||
|
? OperationDialogType.integerSteps
|
||||||
|
: OperationDialogType.countdown,
|
||||||
|
isAutomation
|
||||||
|
? _createAutomationCountDownOptions()
|
||||||
|
: _createCountdownOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
action,
|
action,
|
||||||
action.deviceName,
|
action.deviceName,
|
||||||
Assets.oneGang,
|
Assets.oneGang,
|
||||||
'Light CountDown',
|
'CountDown',
|
||||||
isAutomation
|
isAutomation
|
||||||
? OperationDialogType.integerSteps
|
? OperationDialogType.integerSteps
|
||||||
: OperationDialogType.countdown,
|
: OperationDialogType.countdown,
|
||||||
@ -1033,6 +1149,22 @@ mixin SceneOperationsDataHelper {
|
|||||||
comparator,
|
comparator,
|
||||||
uniqueCustomId,
|
uniqueCustomId,
|
||||||
);
|
);
|
||||||
|
case "ThreeGang":
|
||||||
|
return _createSceneFunction(
|
||||||
|
action,
|
||||||
|
action.deviceName,
|
||||||
|
Assets.twoGang,
|
||||||
|
'R - Light CountDown',
|
||||||
|
isAutomation
|
||||||
|
? OperationDialogType.integerSteps
|
||||||
|
: OperationDialogType.countdown,
|
||||||
|
isAutomation
|
||||||
|
? _createAutomationCountDownOptions()
|
||||||
|
: _createCountdownOptions(),
|
||||||
|
isAutomation,
|
||||||
|
comparator,
|
||||||
|
uniqueCustomId,
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return _createSceneFunction(
|
return _createSceneFunction(
|
||||||
action,
|
action,
|
||||||
@ -1395,6 +1527,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
if (deviceId.contains('delay')) {
|
if (deviceId.contains('delay')) {
|
||||||
return [
|
return [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: taskItem.deviceType,
|
||||||
uniqueCustomId: taskItem.uniqueCustomId,
|
uniqueCustomId: taskItem.uniqueCustomId,
|
||||||
deviceId: taskItem.deviceId,
|
deviceId: taskItem.deviceId,
|
||||||
deviceName: 'delay',
|
deviceName: 'delay',
|
||||||
@ -1417,6 +1550,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
if (taskItem.code == CreateSceneEnum.smartSceneSelect.name) {
|
if (taskItem.code == CreateSceneEnum.smartSceneSelect.name) {
|
||||||
return [
|
return [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
|
deviceType: taskItem.deviceType,
|
||||||
uniqueCustomId: taskItem.uniqueCustomId,
|
uniqueCustomId: taskItem.uniqueCustomId,
|
||||||
deviceId: taskItem.deviceId,
|
deviceId: taskItem.deviceId,
|
||||||
deviceName: taskItem.deviceName.toString(),
|
deviceName: taskItem.deviceName.toString(),
|
||||||
@ -1449,7 +1583,7 @@ mixin SceneOperationsDataHelper {
|
|||||||
_mapExecutorPropertyToSceneFunction(
|
_mapExecutorPropertyToSceneFunction(
|
||||||
Action(
|
Action(
|
||||||
deviceName: taskItem.deviceName,
|
deviceName: taskItem.deviceName,
|
||||||
productType: '',
|
productType: taskItem.deviceType!,
|
||||||
entityId: deviceId,
|
entityId: deviceId,
|
||||||
executorProperty: ExecutorProperty(
|
executorProperty: ExecutorProperty(
|
||||||
functionCode: taskItem.code,
|
functionCode: taskItem.code,
|
||||||
@ -1476,4 +1610,24 @@ mixin SceneOperationsDataHelper {
|
|||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<SceneOperationalValue> _createRelayStatusOptions() {
|
||||||
|
return [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "Power ON",
|
||||||
|
value: 'on',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "Power OFF",
|
||||||
|
value: 'off',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.refreshStatusIcon,
|
||||||
|
description: "Restart Memory",
|
||||||
|
value: 'memory',
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ class SceneStaticFunction {
|
|||||||
final String? deviceIcon;
|
final String? deviceIcon;
|
||||||
final OperationDialogType operationDialogType;
|
final OperationDialogType operationDialogType;
|
||||||
final String? comparator;
|
final String? comparator;
|
||||||
|
final String? deviceType;
|
||||||
|
|
||||||
SceneStaticFunction({
|
SceneStaticFunction({
|
||||||
required this.icon,
|
required this.icon,
|
||||||
@ -28,6 +29,7 @@ class SceneStaticFunction {
|
|||||||
this.deviceIcon,
|
this.deviceIcon,
|
||||||
required this.operationDialogType,
|
required this.operationDialogType,
|
||||||
this.comparator,
|
this.comparator,
|
||||||
|
this.deviceType,
|
||||||
String? uniqueCustomId,
|
String? uniqueCustomId,
|
||||||
}) : uniqueCustomId = uniqueCustomId ?? const Uuid().v4();
|
}) : uniqueCustomId = uniqueCustomId ?? const Uuid().v4();
|
||||||
|
|
||||||
@ -44,6 +46,7 @@ class SceneStaticFunction {
|
|||||||
OperationDialogType? operationDialogType,
|
OperationDialogType? operationDialogType,
|
||||||
String? comparator,
|
String? comparator,
|
||||||
String? uniqueCustomId,
|
String? uniqueCustomId,
|
||||||
|
String? deviceType,
|
||||||
}) {
|
}) {
|
||||||
return SceneStaticFunction(
|
return SceneStaticFunction(
|
||||||
icon: icon ?? this.icon,
|
icon: icon ?? this.icon,
|
||||||
@ -57,6 +60,7 @@ class SceneStaticFunction {
|
|||||||
operationDialogType: operationDialogType ?? this.operationDialogType,
|
operationDialogType: operationDialogType ?? this.operationDialogType,
|
||||||
comparator: comparator ?? this.comparator,
|
comparator: comparator ?? this.comparator,
|
||||||
uniqueCustomId: uniqueCustomId ?? const Uuid().v4(),
|
uniqueCustomId: uniqueCustomId ?? const Uuid().v4(),
|
||||||
|
deviceType: deviceType ?? this.deviceType,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +77,7 @@ class SceneStaticFunction {
|
|||||||
'operationDialogType': operationDialogType.name,
|
'operationDialogType': operationDialogType.name,
|
||||||
'comparator': comparator,
|
'comparator': comparator,
|
||||||
'uniqueCustomId': uniqueCustomId,
|
'uniqueCustomId': uniqueCustomId,
|
||||||
|
'deviceType': deviceType,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +98,7 @@ class SceneStaticFunction {
|
|||||||
: OperationDialogType.none,
|
: OperationDialogType.none,
|
||||||
comparator: map['comparator'],
|
comparator: map['comparator'],
|
||||||
uniqueCustomId: map['uniqueCustomId'] ?? const Uuid().v4(),
|
uniqueCustomId: map['uniqueCustomId'] ?? const Uuid().v4(),
|
||||||
|
deviceType: map['deviceType'] ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +109,7 @@ class SceneStaticFunction {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator, uniqueCustomId: $uniqueCustomId)';
|
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator, uniqueCustomId: $uniqueCustomId, deviceType: $deviceType)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -121,7 +127,7 @@ class SceneStaticFunction {
|
|||||||
other.uniqueCustomId == uniqueCustomId &&
|
other.uniqueCustomId == uniqueCustomId &&
|
||||||
other.operationDialogType == operationDialogType &&
|
other.operationDialogType == operationDialogType &&
|
||||||
listEquals(other.operationalValues, operationalValues) &&
|
listEquals(other.operationalValues, operationalValues) &&
|
||||||
other.deviceId == deviceId;
|
other.deviceId == deviceId && other.deviceType == deviceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -136,7 +142,7 @@ class SceneStaticFunction {
|
|||||||
comparator.hashCode ^
|
comparator.hashCode ^
|
||||||
uniqueCustomId.hashCode ^
|
uniqueCustomId.hashCode ^
|
||||||
operationDialogType.hashCode ^
|
operationDialogType.hashCode ^
|
||||||
operationalValues.hashCode;
|
operationalValues.hashCode ^ deviceType.hashCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,6 +257,7 @@ class DeviceFunctionsView extends StatelessWidget
|
|||||||
deviceName: device.name ?? '',
|
deviceName: device.name ?? '',
|
||||||
uniqueId: function.uniqueCustomId!,
|
uniqueId: function.uniqueCustomId!,
|
||||||
operationType: function.operationDialogType,
|
operationType: function.operationDialogType,
|
||||||
|
deviceType: '',
|
||||||
));
|
));
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
@ -297,6 +298,7 @@ class DeviceFunctionsView extends StatelessWidget
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
||||||
|
deviceType: device.productType!.name,
|
||||||
deviceControlModel: DeviceControlModel(
|
deviceControlModel: DeviceControlModel(
|
||||||
deviceId: device.uuid,
|
deviceId: device.uuid,
|
||||||
code: function.code,
|
code: function.code,
|
||||||
|
@ -70,7 +70,8 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
|||||||
color: ColorsManager.greyColor,
|
color: ColorsManager.greyColor,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pushNamed(context, Routes.smartAutomationSelectRoute, arguments: sceneId);
|
Navigator.pushNamed(context, Routes.smartAutomationSelectRoute,
|
||||||
|
arguments: sceneId);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SceneListTile(
|
SceneListTile(
|
||||||
@ -92,7 +93,8 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _onDelayActionPressed(BuildContext context) {
|
void _onDelayActionPressed(BuildContext context) {
|
||||||
final functionValues = context.read<CreateSceneBloc>().selectedValues['delay'];
|
final functionValues =
|
||||||
|
context.read<CreateSceneBloc>().selectedValues['delay'];
|
||||||
final functions = [
|
final functions = [
|
||||||
SceneStaticFunction(
|
SceneStaticFunction(
|
||||||
deviceId: 'delay',
|
deviceId: 'delay',
|
||||||
@ -115,8 +117,10 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
title: functions[0].operationName,
|
title: functions[0].operationName,
|
||||||
onConfirm: () {
|
onConfirm: () {
|
||||||
final selectedValue = context.read<CreateSceneBloc>().selectedValues['delay'];
|
final selectedValue =
|
||||||
|
context.read<CreateSceneBloc>().selectedValues['delay'];
|
||||||
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
||||||
|
deviceType: '',
|
||||||
deviceControlModel: DeviceControlModel(
|
deviceControlModel: DeviceControlModel(
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
code: '',
|
code: '',
|
||||||
@ -138,7 +142,9 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
|||||||
|
|
||||||
for (var element in tempTaskList) {
|
for (var element in tempTaskList) {
|
||||||
if (element.code == functions[0].code) {
|
if (element.code == functions[0].code) {
|
||||||
context.read<CreateSceneBloc>().add(RemoveTempTaskByIdEvent(code: functions[0].code));
|
context
|
||||||
|
.read<CreateSceneBloc>()
|
||||||
|
.add(RemoveTempTaskByIdEvent(code: functions[0].code));
|
||||||
context
|
context
|
||||||
.read<CreateSceneBloc>()
|
.read<CreateSceneBloc>()
|
||||||
.add(RemoveFromSelectedValueById(code: functions[0].code));
|
.add(RemoveFromSelectedValueById(code: functions[0].code));
|
||||||
|
@ -1141,10 +1141,11 @@ class Assets {
|
|||||||
static const String grid = 'assets/images/grid.svg';
|
static const String grid = 'assets/images/grid.svg';
|
||||||
|
|
||||||
static const String toggleSwitchSmall = 'assets/icons/toggleSwitchSmall.svg';
|
static const String toggleSwitchSmall = 'assets/icons/toggleSwitchSmall.svg';
|
||||||
static const String offToggleSwitchSmall = 'assets/icons/offToggleSwitchSmall.svg';
|
static const String offToggleSwitchSmall =
|
||||||
|
'assets/icons/offToggleSwitchSmall.svg';
|
||||||
static const String saveRoutinesIcon = 'assets/icons/save_routines_icon.svg';
|
static const String saveRoutinesIcon = 'assets/icons/save_routines_icon.svg';
|
||||||
static const String cancelIcon = 'assets/icons/cancel_icon.svg';
|
static const String cancelIcon = 'assets/icons/cancel_icon.svg';
|
||||||
|
|
||||||
|
static const String refreshStatusIcon =
|
||||||
|
'assets/icons/refresh_status_icon.svg';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user