{{ range .Panels }}
{{ .GetLabel }}
{{ range .GetDevices }} {{ if eq .GetType "sensor" }} {{ $deviceName := .GetName }} {{ if .HasSensors }} {{ range .GetSensors }} {{ if eq .Name "temperature" }} {{ .GetIconHtml }} -- °C  {{ else if eq .Name "humidity" }} {{ .GetIconHtml }} --% {{ else if eq .Name "soil_moisture" }} {{ .GetIconHtml }} --% {{ else if eq .Name "illuminance" }} {{ .GetIconHtml }} -- lx {{ else }} {{ .GetIconHtml }}-- {{ end }} {{ end }} {{ end }} {{ if .HasControls }} {{ range .GetControls }}
{{ if eq .GetType "scale" }} {{ .GetIconHtml }} off on
{{ else if eq .GetType "bool" }} {{ .GetIconHtml }} off on
{{ else if eq .GetType "list" }} {{ end }}
{{ end }} {{ end }} {{ end }} {{ end }}
{{ range .GetDevices }} {{ if eq .GetType "sensor" }}{{ continue }}{{ end }}
{{ if eq .GetType "plug" }} {{ .GetIconHtml }} off on {{ end }} {{ if eq .GetType "light" }} {{ .GetIconHtml }} off on
{{ end }} {{ if eq .GetType "blind" }} {{ .GetIconHtml }} close open
{{ end }} {{ if eq .GetType "IRControl" }} {{ .GetIconHtml }} {{ $name := .GetName }} {{ range $cmd := .GetCommands }} {{ $cmd }} {{ end }}
{{ end }} {{ if eq .GetType "shell" }} {{ .GetIconHtml }} {{ $name := .GetName }} {{ range $cmd := .GetCommands }} {{ $cmd }} {{ end }}
{{ end }}
{{ end }}
{{ end }}