From ea318e20d9a513bfae81a9203cef4bca0fc23c2c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 30 九月 2020 11:01:15 +0800
Subject: [PATCH] 202009301
---
HDL_ON/Entity/Function/AC.cs | 43 ++++---------------------------------------
1 files changed, 4 insertions(+), 39 deletions(-)
diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs
index 0233929..671f080 100644
--- a/HDL_ON/Entity/Function/AC.cs
+++ b/HDL_ON/Entity/Function/AC.cs
@@ -1,20 +1,17 @@
锘縰sing System;
-using System.Collections;
using System.Collections.Generic;
-using Newtonsoft.Json.Linq;
-using Shared;
namespace HDL_ON.Entity
{
public class AC : Function
{
/*
- * 绌鸿皟锛歵rait: [switch, mode, fan, temperature, swing, lock]
+ * 绌鸿皟锛歵rait: [switch, mode, fan, set_temperature, swing, lock]
* 灞炴�� 鎻忚堪
* on_off on/off
* mode mode: auto, cool, heat, dry, fan
* fan high, medium, low, auto
- * temperature up,down,value
+ * set_temperature up,down,value
* swing up/down/left/right
* lock boolean (Lock閿佸畾鎺у埗)
*/
@@ -240,13 +237,13 @@
{
if (_trait_temp == null)
{
- _trait_temp = function.Find((obj) => obj.name == "temperature");
+ _trait_temp = function.Find((obj) => obj.name == "set_temperature");
//鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
if (_trait_temp == null)
{
_trait_temp = new Trait()
{
- name = "temperature",
+ name = "set_temperature",
value_key = new List<string> { },
max = 32,
min = 16,
@@ -257,7 +254,6 @@
return _trait_temp;
}
}
-
Trait _trait_swting;
[Newtonsoft.Json.JsonIgnore]
@@ -387,37 +383,6 @@
}
}
}
- /// <summary>
- /// 鎷兼帴銆佽幏鍙朅鍗忚鎿嶄綔鏁版嵁
- /// </summary>
- public override JObject GetSendJObject(CommandType_A command)
- {
- var sendJob = new JObject();
- if (command == CommandType_A.write)
- {
- sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
- JObject data = new JObject { { "sid", sid } };
- sendJob.Add("objects", data);
- List<ControlData> controlData = new List<ControlData>();
- controlData.Add(new ControlData()
- {
- name = "on_off",
- data_type = "Bool",
- value = trait_on_off.value.ToString()
- });
-
-
- }
- else if (command == CommandType_A.read)
- {
- sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
- var data = new JObject { { "sid", sid } };
- sendJob.Add("objects", data);
- }
- return sendJob;
- }
-
-
}
}
--
Gitblit v1.8.0