编号 | 名称 | 类别 | 地址 | 电量 | 在线状态 | 设备状态 | 连接Id | 操作 | 删除 | |
---|---|---|---|---|---|---|---|---|---|---|
@(++index) | @item.Number | @item.Name | @deviceId | @address | @voltage/@battery | @Html.DisplayFor(o => item.IsOnline) |
@if (new int[] { 0x0002, 0x0009, 0x0081, 0x0202, 0x0220, 0x0051 }.Contains(deviceId))
{
PM 1.0:@item.Data.FirstOrDefault(o => o.Key == "PM10")?.Value PM 2.5:@item.Data.FirstOrDefault(o => o.Key == "PM25")?.Value PM 10:@item.Data.FirstOrDefault(o => o.Key == "PM100")?.Value } else if (deviceId == 0x0302) { 温度:@item.Data.FirstOrDefault(o => o.Key == "Temperature")?.Value 湿度:@item.Data.FirstOrDefault(o => o.Key == "Humidity")?.Value } else if (deviceId == 0x0220) { 亮度:@item.Data.FirstOrDefault(o => o.Key == "Brightness")?.Value 色调: @item.Data.FirstOrDefault(o => o.Key == "Hue")?.Value 饱和度: @item.Data.FirstOrDefault(o => o.Key == "Saturation")?.Value 色温:@item.Data.FirstOrDefault(o => o.Key == "ColorTemperature")?.Value } else if (deviceId == 0x0163) { var version = item.Data.FirstOrDefault(o => o.Key == "Version")?.Value; if (!string.IsNullOrEmpty(version)) { 版本:@version } } else if (deviceId == 0x0051) { var electricity = item.Data.FirstOrDefault(o => o.Key == "Electricity")?.Value; if (!string.IsNullOrEmpty(electricity)) { 电量:@electricity } } |
@item.ConnectId |
@if (new int[] { 0x0002, 0x0009, 0x0081, 0x0202, 0x0220, 0x0051 }.Contains(deviceId))
{
开
关
}
@if (deviceId == 0x0202)
{
停
}
@if (deviceId == 0x0163)
{
版本
}
@if (deviceId == 0x0220)
{
}
@if (deviceId == 0x0163)
{
发射:空调:电视:学习:} |
删除设备 |