From 99ef4380c7d72a6f6dc00615ca34f7e3e6154581 Mon Sep 17 00:00:00 2001 From: anlicheng Date: Thu, 14 Sep 2023 16:40:09 +0800 Subject: [PATCH] fix unit --- apps/iot/src/iot_device.erl | 2 +- apps/iot/src/iot_host.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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