[SOLVED] Template widget size

Dear,
I’ve created a my template widget with this code:

<div>
  <table class="auto-style1">
    <tr>
      <td>
      	<div style="width: 100%; height: 100%>" ng-init='SamsungAC_Power={
        						"name": "Stato",
                    "sizeX": 1,
                    "sizeY": 1,
                    "item": config.power_item,
                    "type": "switch",
                    "hidelabel": false,
                    "hideonoff": false,
                    "iconset": "smarthome-set",
                    "icon": "power-button",
                    "icon_size": "32",
                    "row": 1,
                    "col": 1
                      }'  ng-style="{opacity: 1.0}">
        				<widget-switch ng-model="SamsungAC_Power"></widget-switch>
      		</div>
        </td>
      <td>
      		<div ng-init='SamsungAC_Mode={
                            "name": "Modalità",
                            "sizeX": 1,
                            "sizeY": 1,
                            "item": config.mode_item,
                            "type": "selection",
                            "nolinebreak": false,
                            "iconset": "smarthome-set",
                            "icon": "thermostat",
                            "icon_size": "32",
                            "choices_columns": 3,
                            "choices_source": "csv",
                            "choices": "0=Auto,1=Freddo,2=Deumidif.,3=Aria,4=Caldo",
                            "keep_open": false,
                            "no_highlight": false,
                            "row": 1,
                            "col": 1                          
                                     }'  ng-if="itemValue(config.power_item)=='ON'" ng-style="{opacity: 1.0}">
        				<widget-selection ng-model="SamsungAC_Mode"></widget-selection>
      		</div>
      </td>
      <td>
      	<div ng-init='SamsungAC_Wind={
                    "name": "Direzione",
                    "sizeX": 1,
                    "sizeY": 1,
                    "item": config.wind_item,
                    "type": "selection",
                    "nolinebreak": false,
                    "iconset": "smarthome-set",
                    "icon": "air-conditioning-indoor",
                    "icon_size": "32",
                    "choices_columns": 2,
                    "choices_source": "csv",
                    "choices": "0=Su/Giù,1=Fissa",
                    "keep_open": false,
                    "no_highlight": false,
                    "row": 1,
                    "col": 1                       
                             }' ng-if="itemValue(config.power_item)=='ON'" ng-style="{opacity: 1.0}">
          <widget-selection ng-model="SamsungAC_Wind"></widget-selection>
        </div>
      </td>
      <td>
      		<div ng-init='SamsungAC_Fan={
                              "name": "Ventola",
                              "sizeX": 1,
                              "sizeY": 1,
                              "item": config.fan_item,
                              "type": "selection",
                              "nolinebreak": false,
                              "iconset": "smarthome-set",
                              "icon": "ventilation",
                              "icon_size": "32",
                              "choices_columns": 3,
                              "choices_source": "csv",
                              "choices": "0=Auto,1=Bassa,2=Media,3=Alta,4=Turbo",
                              "keep_open": false,
                              "no_highlight": false,
                              "row": 1,
                              "col": 1                          
                                       }' ng-if="itemValue(config.power_item)=='ON'" ng-style="{opacity: 1.0}">
            <widget-selection ng-model="SamsungAC_Fan"></widget-selection>
</div>
      </td>
      <td>
      <div ng-init='SamsungAC_Temp={
                             "name": "Temperatura",
                    				 "sizeX": 3,
                             "sizeY": 1,
                             "item": config.temperature_item,
                             "floor" : 16,
                             "ceil": 30,
                             "step": 1,
                             "hidelabel": false,
                             "hidelimits": false,
                             "vertical": false,
                             "showTicks":true   
                             }' ng-if="itemValue(config.power_item)=='ON'" ng-style="{opacity: 1.0}">
  <widget-slider ng-model="SamsungAC_Temp"></widget-slider>
</div>
      </td>
    </tr>
  </table>
</div>

It works, but I’d like to expand always the slider fom its position to end of widget width, but I don’t understand how.

image

thanks for the help

1 Like

I found answer:

<table width="100%">

I create my widget for Gree AC base on your template…but i have problem with value display for AC_Mode,AC_Wind and AC_Fan. Can you export widget full code and post items file?greeAC