Skip to content

Commit

Permalink
fix: Configuring Display Identification Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AvantLiu committed Feb 18, 2022
1 parent f05801b commit 11a5094
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/dgiot_topo/src/dgiot_topo.erl
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ get_attrs(Type, ProductId, ClassName, Attrs, DeviceId, KonvatId, Shapeid, Identi
save(Type, Attrs),
X#{<<"attrs">> => Attrs};
_ ->
Len = size(Id) - 16,
Identifier1 =
case binary:split(Id, <<$_>>, [global, trim]) of
[ProductId, Identifier2, _] ->
case Id of
<<_:10/binary, "_", Identifier2:Len/binary, "_text">> ->
Identifier2;
_ ->
<<"">>
Expand Down

0 comments on commit 11a5094

Please sign in to comment.