I got really exited by this … i think its a great feature.
But, like others, other than my solar production (solaredge) none of the bespoke data ive managed to get to show in HA is working.
Mine is a mix of solaredge, pvoutput, emonCMS, and bespoke “integrations” with my iotawatt (using rest) and additonal pvoutput via a NodeRed flow publishing to MQTT.
I guess ive got some work to do to make that data behave in the way this expects.
I’ve bought myself a SlimmeLezer and I already had a couple of TP-Link HS110 power plugs with power metering. With minimum effort all the information showed up at the dashboard.
Strange thing is that the Monitor of individual devices on the Energy dashboard shows a negative value. When I’m opening one, I see this:
Go to Configuration > Entity: Select wich entity you want to add in Energy Dashboard
Customize the entity with: state_class : measurement device_class : energy Other : Attribute name = last_reset Attribute Value = 1970-01-01T00:00:00+00:00
Check that the entity “Unit of measurement” is kWh.
Save
Return to Configuration> Energy and now you should find your feed in the list.
It’s same as append that in customize.yaml:
Example :
sensor.emoncms_energie_injectee:
friendly_name: Energie Injectée
state_class: measurement
device_class: energy
icon: mdi:home-export-outline
unit_of_measurement: kWh
last_reset: '1970-01-01T00:00:00+00:00'
For HS110 when you add devices to individual devices, add total Consumption not Daily which reset every day and will give you negative value; watch there are 2 consumptiun for HS110, you need to add total.
Too bad that there is no support for template sensors currently.
I wanted to add the data for my inverters by polling the web API into a template sensor
I have two Solax power inverters. Sadly they have no local API’s (removed in newer firmware) and the workaround available only works with a pocket Wifi Adapter. I have pocket Lan adapters with both of them.
I will contact Solax support again to beg them to open up the local API’s again for integration in Home assistant.
Your cumulative sensors may be differently named depending on your emonCMS setup so replace yours in the config @wyx087 (thank you btw!) provided. E.g. I have 3 x feeds that gather kWh totals:
- sensor:
- name: Consumption
state: "{{ states('sensor.emoncms_import_kwh') | float | round(2) }}"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
- name: Return to Grid
state: "{{ states('sensor.emoncms_use_kwh') | float | round(2) }}"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
- name: Solar Production
state: "{{ states('sensor.emoncms_solar_kwh') | float | round(2) }}"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
Logger: homeassistant.components.sensor.recorder
Source: components/sensor/recorder.py:196
Integration: Sensor (documentation, issues)
First occurred: 7 August 2021, 21:12:00 (4 occurrences)
Last logged: 7 August 2021, 21:12:00
sensor.totaal_verbruik_net_hoog_tarief_cost has unknown unit EUR
sensor.totaal_verbruik_net_laag_tarief_cost has unknown unit EUR
sensor.totaal_teruglevering_hoog_tarief_compensation has unknown unit EUR
sensor.totaal_teruglevering_laag_tarief_compensation has unknown unit EUR
And still no cost showing up in the energy dashboard.
Thanks for the detailed reply… lol it would have been a touch easier if you had included the template: line above -sensor: though once I figured out that it was bloody obvious
For those that need a complete picture to set up the emoncms and the HA energy visualiser step1: configure the emoncms integration so it gets all feeds: step2: configure sensors as per the template below: step3: set the attributes of the new sensors so they meet the data source requirements for the energy panel see 9/Aug update at the bottom of this post. step4: configure the energy visualiser via: http://hassio.lan:8123/energy
or http://hassio.lan:8123/config/energy step5: wait
This is what I have in my configuration:yaml for my local emoncms install (a pi v1)
sensor:
- platform: emoncms
api_key: < I use the read-only api key you get this from the http://192.168.1.x/feed/api >
url: http://192.168.1.x/emoncms
id: 1
template:
- sensor:
- name: Consumption
state: "{{ states('sensor.emoncms_import_kwh') | float | round(2) }}"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
- name: Return to Grid
state: "{{ states('sensor.emoncms_use_kwh') | float | round(2) }}"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
- name: Solar Production
state: "{{ states('sensor.emoncms_solar_kwh') | float | round(2) }}"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
If you have multiple platforms in your sensor config, make sure you aren’t silly like me and you don’t copy-paste into the wrong part of your configuration.yaml
select each of the 3 new entities: sensor.consumption sensor.return_to_grid sensor.solar-production
and carefully paste the text below into each of these in the “Set State Attributes” box: last_reset: ‘1970-01-01T00:00:00+00:00’ last_reset_value_template: ‘1970-01-01T00:00:00+00:00’
Make sure you hit SET STATE each time because without doing that it will not show up to be selected in the energy configuration wizard.
If I need to make any further changes, I will incorporate them here so us part-time Home-Asisstant users find it easy to implement the new energy view.
edit: updated 9/Aug to add this to each sensor, as it seems to get lost after a reboot or something?
Not sure if it’s completely appropriate to post this here but I noticed in the Forecast.Solar Integration there is no way or selecting options for my solar panel / inverter configuration.
I have 6.6kW of solar panels but a 5kW invertor (limited by government regulation) so my solar generation follows a different pattern to if it was 5kW of panels and 5kW invertor, since I can produce more energy during low light conditions compared to having only 5kW of panels, yet my maximum is limited to 5kW.
Any ideas how to work around this? Perhaps I need to email the developer of Forecast.Solar…