Troubles setting up EMONCMS local

emoncns sensor not working with my local installation - I’m not using the cloud store for data

not sure on the exact syntax of the url as it’s not documented… this does not work…
sensors.yaml (called from configuration.yaml)

- platform: emoncms
  api_key: !secret emon_write_key
  id: 1
  unit_of_measurement: "W"

traceback when HA starts with above config

2018-06-15 18:29:59 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform emoncms
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/", line 104, in setup_platform
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/", line 137, in __init__
    self._state = round(float(elem["value"]), DECIMALS)
TypeError: float() argument must be a string or a number, not 'NoneType'

Ideas anyone?

@joyrider3774 any chance you can help? Thanks

@reynos I have not touched / updated home assistant / emoncms for over a year so not sure what all has changed it still works fine in my old version. However looking at the error and the current code my guess is one of your feeds in emoncms does not have a value yet.

You could try and see if it works if you specify the feedid’s of the feeds that you want to use and make sure in emoncms the feeds you wanna use contains at least one value

- platform: emoncms
    api_key: ....
    id: 1
    unit_of_measurement: "W" 
      - 61
      - 110
      - 116
      - 120
      - 5
      - 18
      - 29
      - 48
      - 160
      - 154
      - 158
      - 164
      - 166
      - 168

or use exclude_feed_id to not use the feeds that have no values yet

- platform: emoncms
    api_key: ....
    id: 1
    unit_of_measurement: "W" 
      - 61
      - 110

if you want to find out which feed is not having a value you could use and check the for feeds (id’s) where there is no “value” key pair. It might also be visible in the feed list on emoncms but not sure how it would display

Thanks so much for the ideas, will check.

It certainly was to do with a feed that had a NULL value. I specified exactly which feeds to use and it loaded fine, thanks.

All - Thanks a lot for this solution !