Community
OpenEnergyMonitor

Community

Home Assistant Component update

Tags: #<Tag:0x00007fc33d5a3b08>

Re Topics;


I have just has a PR approved for an update to the HA Emoncms component.

Once live there will be a new variable use_emoncms_unit. This will enable the unit specified in Emoncms to be used by Home Assistant when creating the individual sensors.

All of the emoncms sensors can now be enabled with one configuration entry rather than needing a definition for each ‘type’ (in terms of temp/power/humidity etc) assuming the unit has been set in Emoncms.

I had been reading RC 0.107 release notes and noted your emoncms change.

Really like it. Looks like I’ll be able to simply my configuration from:

  # EmonCMS sensor platform 
  - platform: emoncms
    api_key: !secret emoncms_api
    url: http://192.168.x.x
    id: 1
    unit_of_measurement: "W"
    include_only_feed_id:
    # power: solar, total use, import, export
      - 23
      - 65
      - 66
      - 67
  - platform: emoncms
    api_key: !secret emoncms_api
    url: http://192.168.5.5
    id: 2
    unit_of_measurement: "kWh"
    include_only_feed_id:
    # energy: solar, outdoor, import, export 
      - 52
      - 71
      - 55
      - 56

To:

  # EmonCMS sensor platform 
  - platform: emoncms
    api_key: !secret emoncms_api
    url: http://192.168.x.x
    id: 1
    use_emoncms_unit: true
    include_only_feed_id:
    # power: solar, total use, import, export
      - 23
      - 65
      - 66
      - 67
    # energy: solar, outdoor, import, export 
      - 52
      - 71
      - 55
      - 56

Although the new use_emoncms_unit variable isn’t mentioned in the RC documentation. Reading it I’d thought it will be included automatically?

Ah that’ll be because the Devs decided they didn’t like that method. Just follow the latest docs!

Interesting, looks like the docs have not updated. Has 0.107 been released?

[edit]
I have edited my original post.

107 isn’t released yet. Due to drop next week, the release candidate (RC) is on their rc.home-assistant.io website. On the RC website, they have the updated documentations, see my link above.

1 Like

Yes so you can remove this:

   use_emoncms_unit: true

and

    unit_of_measurement: "W"

Actually, if you use the same configuration (that you had before), if the Unit is set in emonCMS, that value will now be used in preference to the one set in the configuration.

It’s a bit of a breaking change not a full blown this won’t work change :grin:.

Thanks for clarify.

id is still marked as required though?

The reason I prefer to put everything into one is because I really dislike having emoncms2_ in addition to emoncms. I had to do the old way is because of the units. So I’m hoping this (very sensible and excellent) change can tidy up everything.

Ah so it is. It’s actually ignored if 1 but you are right (edited post).

1 Like