From bb76b9da3c856292499e2913280fa2ee43337161 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 03 八月 2022 11:48:57 +0800 Subject: [PATCH] 场景图片oss地址 --- HDL_ON/Entity/Function/Function.cs | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 49 insertions(+), 1 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 38b98be..ba20bf1 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -243,7 +243,30 @@ /// <summary> /// 澶囨敞 /// </summary> - public string name; + public string name = ""; + /// <summary> + /// 璁惧缁戝畾鐨刪omeId + /// </summary> + private string _homeId = ""; + public string homeId + { + get + { + if (string.IsNullOrEmpty(_homeId)) + { + return DB_ResidenceData.Instance.CurrentRegion.id; + } + else + { + return _homeId; + } + } + set + { + _homeId = value; + } + } + /// <summary> /// 璁惧ID /// 浜戠璐熻矗鐢熸垚 @@ -423,6 +446,31 @@ /// </summary> [Newtonsoft.Json.JsonIgnore] public string lastState = ""; + /// <summary> + /// 鑾峰彇鐘舵�佹樉绀烘枃鏈� + /// </summary> + /// <returns></returns> + public string GetLastStateText() + { + var text = ""; + switch (spk) + { + case SPK.HvacCac: + switch (GetAttrState(FunctionAttributeKey.Mode)) + { + case "cool": + text = Language.StringByID(StringId.Cool); + break; + case "heat": + text = Language.StringByID(StringId.Heat); + break; + } + + break; + + } + return text; + } FunctionAttributes _trait_on_off; [Newtonsoft.Json.JsonIgnore] -- Gitblit v1.8.0