diff --git a/apps/iot/src/iot_device.erl b/apps/iot/src/iot_device.erl index 57bd8a9..779aebb 100644 --- a/apps/iot/src/iot_device.erl +++ b/apps/iot/src/iot_device.erl @@ -188,7 +188,7 @@ report_event(DeviceUUID, NewStatus) when is_binary(DeviceUUID), is_integer(NewSt FieldsList = [#{ <<"key">> => <<"device_status">>, <<"value">> => NewStatus, - <<"unit">> => <<"">>, + <<"unit">> => 0, <<"type">> => <<"DI">>, <<"name">> => <<"设备状态"/utf8>>, <<"timestamp">> => Timestamp diff --git a/apps/iot/src/iot_host.erl b/apps/iot/src/iot_host.erl index f195fbe..14df359 100644 --- a/apps/iot/src/iot_host.erl +++ b/apps/iot/src/iot_host.erl @@ -533,7 +533,7 @@ report_event(UUID, NewStatus) when is_binary(UUID), is_integer(NewStatus) -> FieldsList = [#{ <<"key">> => <<"host_status">>, <<"value">> => NewStatus, - <<"unit">> => <<"">>, + <<"unit">> => 0, <<"type">> => <<"DI">>, <<"name">> => <<"主机状态"/utf8>>, <<"timestamp">> => Timestamp