Greetings,
My first post here.
I’ve been following this article by James Ridgeway to integrate a Shelly EM2 into HA:
Energy Monitoring with Shelly EM and Home Assistant (jamesridgway.co.uk)
The Shelly EM is working and I’ve had data coming in for about 2 weeks now.
However I’ve been struggling to get the UK Electricity Standing Charge working.
Here are my configs:
configuration.yaml:
# Loads default set of integrations. Do not remove.`
default_config:
# Text to speech
tts:
’ - platform: google_translate’
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
`
templates.yaml:
`
- sensor:
- name: “Standing Charge Energy”
unit_of_measurement: “kWh”
device_class: energy
state_class: total_increasing
state: >-
{{ (((now().timestamp() / 3600) - 1664044509) | int) / 1000}}
attributes:
last_reset: ‘1970-01-01T00:00:00+00:00’
`
- name: “Standing Charge Energy”
sensors.yaml:
`
- platform: template
sensors:
electricity_kwh_unit_price:
friendly_name_template: “Electricity Unit Price”
value_template: “0.23180”
unit_of_measurement: “£/kWh”
electricity_standing_charge_price:
friendly_name_template: “Electricity Standing Charge Price”
value_template: “10.94875” # (£0.26277 per day * 1000) / 24
unit_of_measurement: “GBP/kWh”
`
The issue:
The final part of the process is to add the standing charge sensor to the Energy Dashboard.
When I Add Consumption ‘Standing Charge Energy’ does not appear in the Top drop list from templates.yaml.
When I click on the ‘Use an entity with current price’ radio button I can see both Electricity Unit Price & Electricity Standing Charge Price from sensors.yaml.
I’ve restarted HA, I’ve reloaded the template and no dice.
I’ve obviously missed something crucial here.
Could anyone provide any pointers please?
The help at the bottom of the list is of no help at all - just says this:
“Expected data source not listed
You’re configuring a statistic but you couldn’t find your source in the dropdown?
That’s caused by a bug in the integration providing the entity.
Integrations need to configure their entities correctly so Home Assistant knows that we need to track statistics for it and how.”