{{#Name=Thermostat}} {{#Description=Standard card for displaying a thermostat device}} {{#Version=1.0}} {{#Author=HomeSeer}} {{#CanBeDeleted=False}} {{#InternalType=Thermostat}} {{#SaveList=}} {{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.device_ref=="" || w.device_ref==null}} Edit to select a thermostat {{else}}
{{if w.show_feature_bar}}
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 thermostat_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) && (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 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==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 }} {{ 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}} {{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 w.show_heat_controls || w.show_temperature || w.show_cool_controls}}
{{if w.show_heat_controls}}
{{if (have_heat && heat_setpoint!='') || (have_autochangeover&& autochangeover_setpoint!='')}} {{end}}
{{end}} {{if w.show_temperature}}
{{end}} {{if w.show_cool_controls}}
{{if have_cool && cool_setpoint!=''}} {{end}}
{{end}}
{{if w.show_heat_controls}}
{{if have_heat}} {{heat_setpoint}} {{else if have_autochangeover}} {{autochangeover_setpoint}} {{end}}
{{end}} {{if w.show_temperature}}
{{ therm_current_temp d.ref }}
{{end}} {{if w.show_cool_controls}}
{{if have_cool}} {{cool_setpoint}} {{end}}
{{end}}
{{if w.show_heat_controls}}
{{if (have_heat && heat_setpoint!='') || (have_autochangeover&& autochangeover_setpoint!='')}} {{end}}
{{end}} {{if w.show_temperature}}
{{end}} {{if w.show_cool_controls}}
{{if have_cool && cool_setpoint!=''}} {{end}}
{{end}}
{{end}} {{if w.show_mode_controls}} {{if have_mode}}
{{ therm_mode_status_image d.ref }}
{{ therm_mode_controls d.ref }}
{{end}} {{end}} {{if w.show_fan_mode_controls}} {{if have_fan}}
{{ therm_fan_status_image d.ref }}
{{ therm_fan_controls d.ref }}
{{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}}
{{end}}