Netatmo Item Binding and Decimal

Tags: #<Tag:0x00007fd313c44288>

(Thomas) #1


i use netatmo for weather.
My item looks like

Number:Temperature Netatmo_wz_Temperature         "Temperature [%.1f %unit%]"          <temperature>      { channel = "netatmo:NAMain:2312dcff:70ee502ea39a:Temperature" }

But in my Habpanel the items shows a big number.

How can i solve my Problem?
I have try the " | number:0" or “’%.01f’ | sprintf:” but nothink works for me.

Iam new to openhab.

(Vincent Regaud) #2
Number:Temperature Netatmo_wz_Temperature         "Temperature [%.1f °C]"          <temperature>      { channel = "netatmo:NAMain:2312dcff:70ee502ea39a:Temperature" }

(Harry) #3

Check/change the HABPanel-settings


(Thomas) #4

Its a custom Widget

				<div class="main">{{itemValue('Netatmo_wz_Temperature')}}</div>

and | number:1 at the end dosnt work

(Harry) #5

I checked your code and it works fine.
What OS, oH- and java-version do you use?

(Thomas) #6

Okay, i use Openhabian with oh2.3 and a pi 3+ b
In PaperUI it works fine and in ClassicUi too.


(Harry) #7

Please post your complete widget code.

(Thomas) #8
	<div class="bigDash">
		<div class="top">
			<div class="icon on"><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/squidink.svg#thermometer-3"></use></svg></div>
			<div class="value">
				<div class="main">{{itemValue('Netatmo_wz_Temperature')}}</div>
				<div class="sub">&#176C</div>

(treesink) #9

I have exact the same issue. I use the netatmo widget.

(Thomas) #10

I think its the Number:Temperature.
Without the :Temperature its dosnt work but it think its now a number and i can use | number:1

(Thomas) #11

IDk whats wrong.

(Thomas) #12

Maybee i need to try the V1 Binding

(Mikael Gustafsson) #13

I posted a solution to this a few days ago.

(Thomas) #14

Thanks i give it a try.
How looks your Item?

(Mikael Gustafsson) #15

I’m not at home right now, but my items are very basic. E.g my outside temperature is of type number with dimension temperature.

(Thomas) #16

You are so awesome

{{'%.1f' | sprintf:itemValue('KChe_Temperatur').split(' ')[0]}}

Work for me