mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 03:27:56 +00:00
count_down_ac
This commit is contained in:
@@ -11,12 +11,14 @@ class AcStatusModel {
|
||||
bool childLock;
|
||||
late TempModes acMode;
|
||||
late FanSpeeds acFanSpeed;
|
||||
int countdown1;
|
||||
|
||||
AcStatusModel(
|
||||
{required this.uuid,
|
||||
required this.acSwitch,
|
||||
required this.modeString,
|
||||
required this.tempSet,
|
||||
required this.countdown1,
|
||||
required this.currentTemp,
|
||||
required this.fanSpeedsString,
|
||||
required this.childLock}) {
|
||||
@@ -30,6 +32,7 @@ class AcStatusModel {
|
||||
late int _tempSet;
|
||||
late int _currentTemp;
|
||||
late String _fanSpeeds;
|
||||
late int _countdown1;
|
||||
late bool _childLock;
|
||||
for (int i = 0; i < jsonList.length; i++) {
|
||||
if (jsonList[i].code == 'switch') {
|
||||
@@ -44,6 +47,8 @@ class AcStatusModel {
|
||||
_fanSpeeds = jsonList[i].value ?? 210;
|
||||
} else if (jsonList[i].code == 'child_lock') {
|
||||
_childLock = jsonList[i].value ?? false;
|
||||
} else if (jsonList[i].code == 'countdown_time') {
|
||||
_countdown1 = jsonList[i].value ?? 0;
|
||||
}
|
||||
}
|
||||
return AcStatusModel(
|
||||
@@ -53,6 +58,7 @@ class AcStatusModel {
|
||||
tempSet: _tempSet,
|
||||
currentTemp: _currentTemp,
|
||||
fanSpeedsString: _fanSpeeds,
|
||||
countdown1: _countdown1,
|
||||
childLock: _childLock);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user