mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
Implement Two-Gang & One-Gang
This commit is contained in:
@ -43,6 +43,8 @@ enum DeviceType {
|
||||
DoorLock,
|
||||
Curtain,
|
||||
Blind,
|
||||
OneGang,
|
||||
TwoGang,
|
||||
ThreeGang,
|
||||
Gateway,
|
||||
CeilingSensor,
|
||||
@ -68,6 +70,8 @@ Map<String, DeviceType> devicesTypesMap = {
|
||||
"DL": DeviceType.DoorLock,
|
||||
"WPS": DeviceType.WallSensor,
|
||||
"3G": DeviceType.ThreeGang,
|
||||
"2G": DeviceType.TwoGang,
|
||||
"1G": DeviceType.OneGang,
|
||||
"CUR": DeviceType.Curtain,
|
||||
};
|
||||
Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
||||
@ -155,6 +159,33 @@ Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
||||
FunctionModel(
|
||||
code: 'indicator', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||
],
|
||||
DeviceType.OneGang:[
|
||||
FunctionModel(
|
||||
code: 'switch_1', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||
FunctionModel(
|
||||
code: 'countdown_1',
|
||||
type: functionTypesMap['Integer'],
|
||||
values: ValueModel.fromJson({"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
||||
],
|
||||
DeviceType.TwoGang:[
|
||||
FunctionModel(
|
||||
code: 'switch_1', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})
|
||||
),
|
||||
FunctionModel(
|
||||
code: 'switch_2', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})
|
||||
),
|
||||
FunctionModel(
|
||||
code: 'countdown_1',
|
||||
type: functionTypesMap['Integer'],
|
||||
values: ValueModel.fromJson({"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})
|
||||
),
|
||||
FunctionModel(
|
||||
code: 'countdown_2',
|
||||
type: functionTypesMap['Integer'],
|
||||
values: ValueModel.fromJson({"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})
|
||||
),
|
||||
],
|
||||
|
||||
DeviceType.ThreeGang: [
|
||||
FunctionModel(
|
||||
code: 'switch_1', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||
|
Reference in New Issue
Block a user