修改一些BUG
修改碳达人问题,增加小数,增加门锁的支持
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user