Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Hide member list if it is empty for valid SpaceAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
muellermartin committed Mar 17, 2022
1 parent 53874f1 commit 16d105b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/status.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"sensors": {
"people_now_present": [
{
"value": {{"sensor/space/member/present" | mqtt | jsonize "int"}},
"names": {{"sensor/space/member/names" | mqtt | csvlist | jsonize "[]string"}}
"value": {{"sensor/space/member/present" | mqtt | jsonize "int"}}{{$names := "sensor/space/member/names" | mqtt}}{{if ne $names "<nil>"}},
"names": {{$names | csvlist | jsonize "[]string"}}{{end}}
}
],
"space_members": [
Expand Down

0 comments on commit 16d105b

Please sign in to comment.