Custom widget for Homematic-IP Thermostats

Hi Micha, thanks for answering. I tried “1.0*itemValue…” but still getting NaN in the log. So it probably has something to do with data types. The item is configured in PaperUI as follows:

Type = Number
Dimension = Temperature

Could it be returning the value as 19.0 °C, i.e. including the unit? That is not then not a number (NaN).

How can I find which type is being returned?

Just found the solution. You helped me think in the right direction. Thnaks. If I remove Temperature
under Dimension from the item configration, it works correctly. So I obvioulsy have to convert the value somehow. Will look in to that soon and post my solution.

Thanks for the compliment on my graphics. I’m trying to make my dashboard as realistic as possible. My light switches look like real light switches too and when I click them, I change the shading so it looks as if the actually tilt. Cool effect.

Thanks

Rob

Solved the problem. I resorted to just using Number and not Number:Temperature in the Item configuration. I also learnt how to create a setpoint max and min for my custom widget. The buttons are now limited between 16°C and 23°C:

<div class="mybtn" ng-click="sendCmd('Thermostat_Buero_SetPointTemperature', +itemValue('Thermostat_Buero_SetPointTemperature') - 0.5 < 16 ? 16 : +itemValue('Thermostat_Buero_SetPointTemperature') - 0.5)">
    	<img class="img-responsive" src="/static/buttons/volumeDown.png"></img><img class="img-responsive img-top" src="/static/buttons/volumeDown_Hover.png"></img>
    </div>
    <div class="mybtn" ng-click="sendCmd('Thermostat_Buero_SetPointTemperature', +itemValue('Thermostat_Buero_SetPointTemperature') + 0.5 > 23 ? 23 : +itemValue('Thermostat_Buero_SetPointTemperature') + 0.5)">
    	<img class="img-responsive" src="/static/buttons/volumeUp.png"></img><img class="img-responsive img-top" src="/static/buttons/volumeUp_Hover.png"></img>
    </div>

Openhab is just great fun to work on.

Rob