修改一些BUG

修改碳达人问题,增加小数,增加门锁的支持
This commit is contained in:
2026-03-03 17:18:43 +08:00
parent 10e3a135dd
commit 990ba9ce7b
8 changed files with 171 additions and 22 deletions

View File

@@ -475,15 +475,22 @@ namespace WebSite.Controllers
actions.Add("setVolumeMute");
break;
default:
if ((hostModal.Modal.Name != null && hostModal.Modal.Name.IndexOf("灯") > -1) ||
(hostModal.Modal.EnglishName != null && hostModal.Modal.EnglishName.ToLower().IndexOf("light") > -1) ||
(hostModal.Modal.TWName != null && hostModal.Modal.TWName.IndexOf("燈") > -1))
if (hostModal.Modal.ModalAddress.Equals("004000010"))
{
applianceTypes.Add("LIGHT");
applianceTypes.Add("DOOR_LOCK");
}
else
{
applianceTypes.Add("SWITCH");
if ((hostModal.Modal.Name != null && hostModal.Modal.Name.IndexOf("灯") > -1) ||
(hostModal.Modal.EnglishName != null && hostModal.Modal.EnglishName.ToLower().IndexOf("light") > -1) ||
(hostModal.Modal.TWName != null && hostModal.Modal.TWName.IndexOf("燈") > -1))
{
applianceTypes.Add("LIGHT");
}
else
{
applianceTypes.Add("SWITCH");
}
}
actions.Add("turnOn");
actions.Add("turnOff");