{{if w==null}} {{widget_id=queries['widget_id']}} {{w=widget_by_id widget_id}} {{end}} {{num_widgets = widget_count w.id}} {{d=device_by_ref w.device_ref}} {{dbs=dashboards_ref}} {{if d}}
{{if w.show_feature_bar}}
0}} onclick="show_children({{ d.primary_ref }})" {{end}} data-toggle="modal" data-target="#childcontrol"{{end}} class="{{if !dbs.edit_mode}}fa-point{{end}} text-right col mr-2 devices_children_icon d-xl-inline-block float-xl-none border border-top-0 border-right-0 border-left-0 pb-1"> {{ for c in d.children }} {{ if c.status_suffix=='%' || c.status_suffix=='@S@' }} {{ status_text_no_html c.ref }} {{ end }} {{ end }} {{ if d.child_count == 0 }} {{ end }}
{{end}} {{if w.show_location1 || w.show_location2}}
{{if location1_display_first}} {{if w.show_location1}}{{d.location}}{{end}} {{if w.show_location2}}{{if use_location2}} | {{d.location2}} {{end}}{{end}} {{else}} {{if w.show_location2}}{{if use_location2}}{{d.location2}} | {{end}}{{end}}{{if w.show_location1}}{{d.location}}{{end}} {{end}}
{{end}} {{if w.show_name}}
{{d.name}}
{{end}} {{if d.child_count==0}}
{{if w.show_status_image}}
{{end}}
{{device_prop d.ref 'Name'}}
{{ status_text d.ref }}
{{# Check if this device has controls on the root (HS3 device)}} {{row1 = controls_row d.ref 1}} {{if row1 != ''}}
{{row1}}
{{end}} {{row2 = controls_row d.ref 2}} {{if row2 != ''}}
{{row2}}
{{end}} {{row3 = controls_row d.ref 3}} {{if row3 != ''}}
{{row3}}
{{end}} {{end}} {{ for feature_prop in w.all_features }} {{fref=feature_prop.value.ref}} {{if feature_prop.value.show_feature}}
{{device_prop fref 'Name'}}
{{ status_text fref }}
{{row1 = controls_row fref 1 }} {{if row1 != ''}}
{{row1}}
{{end}} {{row2 = controls_row fref 2}} {{if row2 != ''}}
{{row2}}
{{end}} {{row3 = controls_row fref 3}} {{if row3 != ''}}
{{row3}}
{{end}} {{end}} {{end}}
{{end}}