{{# we may be built from a status update, so the device is passed to us through the query}} {{if d==null}} {{d=device_by_ref queries['ref']}} {{end}}
{{if (get_setting_bool 'gHideFeaturesBar')!='checked'}}
0}} onclick="show_children({{ d.primary_ref }})" {{end}} data-toggle="modal" data-target="#childcontrol" class="{{if (array.size d.children)>0}}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"> {{if (d.version < 4) && ((user_has_access_for_display d.ref user)=='checked') && (d.primary_ref != d.ref)}} {{if d.device_api==513 && ((d.edevice_type==16 && (d.device_sub_type==0 || d.device_sub_type==6 || d.device_sub_type==7)) || (d.edevice_type==17 && (d.device_sub_type==1 || d.device_sub_type==2 || d.device_sub_type==3 || d.device_sub_type==4 || d.device_sub_type==10)))}} {{# do no display thermostat/child devices for which information is already in the body of the card}} {{else}} {{ if d.status_suffix=='%' || d.status_suffix=='@S@' }} {{ status_text_no_html d.ref }} {{ end }} {{end}} {{end}} {{ for c in d.children }} {{if (user_has_access_for_display c.ref user)=='checked'}} {{if c.device_api==513 && ((c.edevice_type==16 && (c.device_sub_type==0 || c.device_sub_type==6 || c.device_sub_type==7)) || (c.edevice_type==17 && (c.device_sub_type==1 || c.device_sub_type==2 || c.device_sub_type==3 || c.device_sub_type==4 || c.device_sub_type==10)))}} {{# do no display thermostat/child devices for which information is already in the body of the card}} {{else}} {{ if c.status_suffix=='%' || c.status_suffix=='@S@' }} {{ status_text_no_html c.ref }} {{ end }} {{end}} {{end}} {{ end }} {{ if d.child_count == 0 }} {{ end }}
{{end}}
{{if location1_display_first}} {{d.location}} {{if use_location2}} | {{d.location2}} {{end}} {{else}} {{if use_location2}}{{d.location2}} | {{end}}{{d.location}} {{end}}
{{d.name}}
{{have_heat=false}} {{have_cool=false}} {{have_autochangeover=false}} {{have_mode=false}} {{have_fan=false}} {{heat_setpoint=''}} {{cool_setpoint=''}} {{autochangeover_setpoint=''}} {{ for c in d.children }} {{if c.edevice_type==17}} {{if c.device_sub_type==1}} {{have_heat=true}} {{heat_setpoint=therm_current_heat_set d.ref}} {{end}} {{if c.device_sub_type==2}} {{have_cool=true}} {{cool_setpoint=therm_current_cool_set d.ref}} {{end}} {{if c.device_sub_type==10}} {{have_autochangeover=true}} {{autochangeover_setpoint=therm_current_autochangeover_set d.ref}} {{end}} {{if c.device_sub_type==3}} {{have_mode=true}} {{end}} {{if c.device_sub_type==4}} {{have_fan=true}} {{end}} {{end}} {{end}}
{{if (have_heat && heat_setpoint!='') || (have_autochangeover&& autochangeover_setpoint!='')}} {{end}}
{{if have_cool && cool_setpoint!=''}} {{end}}
{{if have_heat}} {{heat_setpoint}} {{else if have_autochangeover}} {{autochangeover_setpoint}} {{end}}
{{ therm_current_temp d.ref }}
{{if have_cool}} {{cool_setpoint}} {{end}}
{{if (have_heat && heat_setpoint!='') || (have_autochangeover&& autochangeover_setpoint!='')}} {{end}}
{{if have_cool && cool_setpoint!=''}} {{end}}
{{if have_mode}}
{{ therm_mode_status_image d.ref }}
{{ therm_mode_controls d.ref }}
{{end}} {{if have_fan}}
{{ therm_fan_status_image d.ref }}
{{ therm_fan_controls d.ref }}
{{end}}
{{ last_change_root d.primary_ref }} {{ vc=(device_enabled_for_voice d.primary_ref) }} {{ if vc != '' }}    {{end}}