[Template Widget] Help with ui-knob

hi guy’s …
sorry for bother you :wink:

i made my knop from some sample i found here and it looks nice

        <div>|{{itemValue('TadoHeizung_TargetTemperature').split(' ')[0]}}|</div>
        <div ng-init="knob = {
                    value: 18.0,
                    options: {
                      scale: {enabled:true,type:'dots',color:'gray',width:2,spaceWidth:10,quantity:5,height:8},
                      skin: {type:'tron',width:5,color:'#0FA8DB',spaceWidth:5},
                      trackWidth: 30,
                      barWidth: 30,
                      step: 0.2,
                      startAngle: 20,
                      endAngle: 340,
                      xtrackColor: 'rgba(52,152,219,.1)',
                      barColor: 'rgba(52,152,219,.5)',
                      textColor: 'white',
                      min:10,max:30
                    }
                   };">
      </div>
        
      <div>
				<ui-knob value='18.0' options="knob.options" ng-click="sendCmd(config.TadoHeizung_TargetTemperature, knob.value)"/>
      </div>

the {{itemValue(‘TadoHeizung_TargetTemperature’).split(’ ')[0]}} remove the ‘°C’ from the result “18.0 °C”
and give me 18.0 … this work well!

i try 100 way’s but i am unable to set the value to {{itemValue(‘TadoHeizung_TargetTemperature’).split(’ ')[0]}} **grrr

please … can someone help me ?

thx 4 support :wink:

  • Hardware: Pi 3B +
  • OS: openHabPi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
  • Java Runtime Environment: (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
  • openHAB version: 2.3.0-1

you didn’t read the 3rd post on that thread :slight_smile:

yep ! but … i like to know why this is not working

        <div>|{{itemValue('TadoHeizung_TargetTemperature').split(' ')[0]}}|</div>
        <div ng-init="knob = {
                    value: {{itemValue('TadoHeizung_TargetTemperature').split(' ')[0]}},
                    options: {
                      scale: {enabled:true,type:'dots',color:'gray',width:2,spaceWidth:10,quantity:5,height:8},
                      skin: {type:'tron',width:5,color:'#0FA8DB',spaceWidth:5},
                      trackWidth: 30,
                      barWidth: 30,
                      step: 0.2,
                      startAngle: 20,
                      endAngle: 340,
                      xtrackColor: 'rgba(52,152,219,.1)',
                      barColor: 'rgba(52,152,219,.5)',
                      textColor: 'white',
                      min:10,max:30
                    }
                   };">
      </div>
        
      <div>
				<ui-knob value='{{itemValue('TadoHeizung_TargetTemperature').split(' ')[0]}}' options="knob.options" ng-click="sendCmd(config.TadoHeizung_TargetTemperature, knob.value)"/>
      </div>

i understand your way to copy & paste from a standard knop but here i miss only a bit to get this working

and i cant foud :frowning:
thyx 4 support

Newi

if i use examine element in my browser i see
at the “knob = {value:” 21.0 the value from my tado

at the <ui-knob value=’ i see {{itemValue(‘TadoHeizung_TargetTemperature’).split(’ ')[0]}} not the value

and i dont understand why

what you don’t understand from the statement that I quoted: “you can’t use ui-knob”
the solution is also in that quote