First time edit of Config File - Incorrect type. Expected "array"

I am doing my first edit of the config file. Trying to link HA to my emoncms.
I simply copy the yaml code from the integrations/emoncms page and paste into the configuration.yaml file. I get an error in the editor: Incorrect Type. Expected “array”

Can anybody please advise this newbie on what I am doing wrong?

Should be:

sensor:
  - platform: emoncms
    api_key: API_KEY
    url: https://emoncms.org
    id: 1
1 Like

Thank you. I out in the ‘read API key’ from emoncms and all looks good. I restarted HA but still don’t see anything from emoncms. Is there another step that I need to do to see my emoncms in HA please?

I found this in the log. Can anyone explain to me what I have done wrong in trying to lntegrate to my emoncms please?
Logger: homeassistant.components.sensor
Source: components/emoncms/sensor.py:160
Integration: Sensor (documentation, issues)
First occurred: 18:54:59 (1 occurrences)
Last logged: 18:54:59

Error while setting up emoncms platform for sensor

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 193, in _async_setup_platform await asyncio.shield(task) File “/usr/local/lib/python3.8/concurrent/futures/thread.py”, line 57, in run result = self.fn(*self.args, **self.kwargs) File “/usr/src/homeassistant/homeassistant/components/emoncms/sensor.py”, line 115, in setup_platform EmonCmsSensor( File “/usr/src/homeassistant/homeassistant/components/emoncms/sensor.py”, line 160, in init self._state = round(float(elem[“value”]), DECIMALS) KeyError: ‘value’