From b2f2494386c4629cf0e0f0a3740e7672919d53a2 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 06 一月 2021 17:09:55 +0800
Subject: [PATCH] 修改了彩灯的百分比计算

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
index 109732b..d654786 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
@@ -97,7 +97,7 @@
                 {
                     return Language.StringByID(R.MyInternationalizationString.Close);
                 }
-                return $"{(int)((device as DimmableLight).Level * 1.0 / 254 * 100)}%";
+                return HdlDeviceCommonLogic.Current.CalculateLightLevelPersent((device as DimmableLight).Level) + "%";
             }
             else if (device.Type == DeviceType.ColorTemperatureLight)
             {
@@ -110,7 +110,7 @@
                 {
                     return Language.StringByID(R.MyInternationalizationString.Close);
                 }
-                return $"{(int)((device as ColorTemperatureLight).Level * 1.0 / 254 * 100)}%";
+                return HdlDeviceCommonLogic.Current.CalculateLightLevelPersent((device as ColorTemperatureLight).Level) + "%";
             }
             else if (device.Type == DeviceType.WindowCoveringDevice)
             {

--
Gitblit v1.8.0