{{#Name=Gauge}} {{#Description=Displays a gauge with a pointer}} {{#Version=1.0}} {{#Author=HomeSeer}} {{#CanBeDeleted=False}} {{#SaveList=save_name_size,save_text_color,save_text_bold,save_stroke_width,save_value_font_size,save_value_font_color,save_value_font_bold}} {{# gauge display courtesy of https://www.cssscript.com/animated-svg-gauge/}} {{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]="Title"}} {{display_text=get_value 'save_display_text' 'Change Me' 'Name' 'text'}} {{text_size=get_value 'save_name_size' '16' 'Size' 'text'}} {{text_color=get_value 'save_text_color' '#000000' 'Color' 'color'}} {{text_bold=get_value 'save_text_bold' 'on' 'Bold' 'toggle'}} {{sections[index]="Gauge Min/Max"}} {{min_value=get_value 'save_min_value' '0' 'Min Value' 'text'}} {{max_value=get_value 'save_max_value' '100' 'Max Value' 'text'}} {{sections[index]="Appearance"}} {{stroke_width=get_value 'save_stroke_width' '10' 'Stroke Width' 'text'}} {{sections[index]="Value Text"}} {{value_suffix=get_value 'save_value_suffix' '' 'Suffix' 'text'}} {{value_font_size=get_value 'save_value_font_size' '16' 'Size' 'text'}} {{value_font_color=get_value 'save_value_font_color' '#000000' 'Color' 'color'}} {{value_font_bold=get_value 'save_value_font_bold' '' 'Bold' 'toggle'}} {{value_dec_places=get_value 'save_dec_places' '0' 'Dec Places' 'text'}} {{sections[index]="Range Colors"}} {{color_1=get_value 'save_color_1' '#808080' '0-25%' 'color'}} {{color_2=get_value 'save_color_2' '#FFA500' '25%-50%' 'color'}} {{color_3=get_value 'save_color_3' '#FF8C00' '50%-75%' 'color'}} {{color_4=get_value 'save_color_4' '#FFFF00' '75%-100%' 'color'}} {{#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}} {{# normal display HTML is here. This is what is displayed when viewing the card in non-edit mode}} {{# get the value of the device }} {{device_val = device_value feature_item_ref}} {{device_status = status_text feature_item_ref}}