{{#Name=Single Device Status Icon}} {{#Description=Displays a single device status icon with control}} {{#Version=1.0}} {{#Author=HomeSeer}} {{#CanBeDeleted=False}} {{#SaveList=save_show_device_name_toggle,save_name_color,save_name_size,save_icon_width,save_icon_height,save_title_size,save_title_color,save_title_bold}} {{includefileraw Dashboards/Cards/Custom/Common/CommonHeader.html}} {{#get settings that will also be used in the autogenerate settings dialog. This fills the arrays above}} {{sections[index]="Custom Title"}} {{title=get_value 'save_title' '' 'Title' 'text'}} {{title_size=get_value 'save_title_size' '18' 'Size' 'text'}} {{title_color=get_value 'save_title_color' '#000000' 'Color' 'color'}} {{title_bold=get_value 'save_title_bold' '' 'Bold' 'toggle'}} {{sections[index]="Status Display"}} {{status_show=get_value 'save_status_show' '' 'Display Status' 'toggle'}} {{status_size=get_value 'save_status_size' '18' 'Size' 'text'}} {{status_color=get_value 'save_status_color' '#000000' 'Color' 'color'}} {{status_bold=get_value 'save_status_bold' '' 'Bold' 'toggle'}} {{sections[index]="Last Change Display"}} {{lastchange_show=get_value 'save_lastchange_show' '' 'Display Last Change' 'toggle'}} {{lastchange_size=get_value 'save_lastchange_size' '18' 'Size' 'text'}} {{lastchange_color=get_value 'save_lastchange_color' '#000000' 'Color' 'color'}} {{lastchange_bold=get_value 'save_lastchange_bold' '' 'Bold' 'toggle'}} {{sections[index]="Settings"}} {{show_device_name=get_value 'save_show_device_name_toggle' '' 'Show Name' 'toggle'}} {{sections[index]="Name Display"}} {{name_color=get_value 'save_name_color' 'black' 'Color' 'color'}} {{name_size=get_value 'save_name_size' '16px' 'Size' 'text'}} {{sections[index]="Status Icon"}} {{icon_width=get_value 'save_icon_width' '48' 'Width' 'text'}} {{icon_height=get_value 'save_icon_height' '48' 'Height' 'text'}} {{#get settings that will not be configured with the settings dialog}} {{# these are values that may or may not be displayed in the setings dialog but need to be displayed with custom HTML that the autogen code cannot handle }} {{feature_item_ref=get_saved_value 'save_feature_item' widget_id}} {{if feature_item_ref=='' feature_item_ref='0' end}} {{control1_value=get_saved_value 'save_control1' widget_id}} {{control2_value=get_saved_value 'save_control2' widget_id}} {{# normal display HTML is here. This is what is displayed when viewing the card in non-edit mode}}
{{if show_device_name=='on' || title_text != ''}}
{{if show_device_name=='on'}} {{dev=device_by_ref feature_item_ref}} {{dev_primary=device_by_ref dev.primary_ref}} {{dev_primary.name}}-{{dev.name}} {{else}} {{title}} {{end}}
{{end}}
{{img_file = status_image_file feature_item_ref}} {{if img_file=='' img_file='images/HomeSeer/status/nostatus.gif' end}}
{{if status_show=='on'}}
{{status_text feature_item_ref}}
{{end}} {{if lastchange_show=='on'}}
{{# the following 2 lines can be enabled for custom date/time formats}} {{#lc=last_change_date feature_item_ref}} {{#date.to_string lc "%a %b %e %r %Y"}} {{last_change feature_item_ref}}
{{end}}
{{#if we are not in edit mode, don't bother including the edit mode content}} {{if dbs.edit_mode}} {{# card settings dialog, the second tab autogenerates settings based on values added to the settings arrays. Custom settings HTML can be added}} {{#this dialog has 2 tabs, one for formatting the card, the other for card content}} {{# w=widget class, dashboard=dashboard name, d=device}}
{{#pop-up dialog to select an HS device feature}}
{{includefileraw Dashboards/Cards/Custom/Common/CommonScript.html}} {{else}} {{end}}