Custom widgets: Netatmo

I have created two custom widgets for my Netatmo weather station.

Here is a screenshot of them:

The Netatmo widget can be used for main, indoor and outdoor module.
You can show the value for CO2 or pressure. If you want to show the pressure you have to select a non numeric item (e.g. switch) for CO2, if you want to show CO2 you have to select a non numeric item for pressure.
For showing the battery status it’s the same behavior, if there is no battery (e.g. main module) select a non numeric item.

The Netatmo Rain widget can be used for rain module :wink:

Files are now on github

Update: changed signal icon for openhab2.2

Hope they are useful to someone.


Really nice and useful widget. As I don’t have a netatmo, but some Xiaomi Smart Home temperature and humidity sensors, I don’t have any use for CO2, battery, pressure and reception, so it took me a while to figure out how to hide them (select a non-numeric item, but that’s not very intuitive). Is there any way to include a “None” item in the item selection list, which should be the default. In my case, all items were pre-filled with the kodi volume item, which just doesn’t make sense…

I am glad it is useful.
I know the non-numeric items are not elegant, but i did not found a better solution at the moment.
As far as i know it is not possible to have a ‘no item’ selection.
Maybe I find a better solution

Thanks for your widget. I made one for my netatmo, but I like yours a lot better.

As for the option to hide an item, the easiest solution I found was to add a checkbox config item that can be used to hide or display something. In the “now playing” widget I did for Onkyo players, I added a checkbox to hide the cover art image, for those players that don’t support it. Take a look at the json from this thread, specifically the now playing widget.

Hope that helps, and thanks again for the widget.

1 Like

I have updated the widgets, so it is now possible to hide values with a checkbox (>= openhab 2.1).
I also added a link to a target dashboard. if you have an overview dashboard with some of this widgets and you click on e.g. bedroom widget you get to the bedroom dashboard.
I uploaded the new widgets to github.

Just upgraded to OH2.3 and changed the type definitions for Netatmo items as described, e.g. “Number:Length GA_Rain_Current”. For me, this results into problems with the Netatmo widget not showing any values.

Anybody else with this problem?

I have the same problem. Remove the server side formatting option causes the data to be shown. But how to format the items?

Yeb. I’ve the same problem.

Any fix available? It only displays “sprintf:itemValue…” and I get errors in the browser JS console:
TypeError: [sprintf] expecting number but found string

I am using openHAB 2.3 with the current Netatmo binding.

Edit: This is the fix/workaround:
Change all sprintf:itemValue( to sprintf:itemValue(’ ')[0]

The reason is that the values are already formatted by the binding if you use PaperUI to create all items. I did not find out how to get the raw item value in a custom widget. itemValue(abc, true) does not help.

Another problem with the widget is that all rows have little vertical space between each other, the text is too small and so there is a lot of white space at the top and bottom. Maybe I can fix the CSS…

I committed an update to github to make UoM items work now.

@mag2000 Great, thanks!

The Temp Trend widget also needs an update for the current version of the Netatmo binding. This is my change:

<div ng-if="itemValue(config.temptrend)=='up'">
   <widget-icon iconset="'eclipse-smarthome-classic'" icon="'flowpipe'"/>
<div ng-if="itemValue(config.temptrend)=='down'">
   <widget-icon iconset="'eclipse-smarthome-classic'" icon="'returnpipe'"/>
<div ng-if="itemValue(config.temptrend)=='stable'">
   <widget-icon iconset="'eclipse-smarthome-classic'" icon="'flow'"/>

The Netatmo Widget is really nice, but for some reason it is now showing
{{’%.1f’ | sprintf:itemValue(config.carbondioxide).split(’ ')[0]}}
instead of a value.
It worked like a charm for weeks but this effect showed up at some moment in time where I didn’t change anything.
Any ideas what to do to fix it?

hi, i live the widgets, but have som problem get my token or author code, where can i find them and connet the mto the nice widgets?

im not so good att coding so plz help
thanks for helping

Hi guys,

I’m trying the netamo widget in habpanel. It is working well, but does not look very nice on mobile devices. It seems, that the font scaling is somehow not working or not handled. Any thoughts on it?


Hi Folks,

can anyone say, why the rain widget has a white font compared to a grey font of the normal Netatmo widget? How can I change the font color?

Greetings Flo

FYI, I added this in code line 11: „color: rgb(255, 255, 255)“. Works :smiley: