home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.83k stars 29.53k forks source link

OVO Energy Gas Reading not available to Home Assistant Energy Consumption #56131

Closed dave-tucker closed 2 years ago

dave-tucker commented 2 years ago

The problem

I've set up the OVO integration and I can see my Electricity and Gas readings from my Smart Meter. I can add the Electriciy Reading and Cost values to the "Energy" tab to track my usage. I cannot add the Gas source as the UI says "No matching statistics found"

What is version of Home Assistant Core has the issue?

core-2021.9.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ovo_energy

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ovo_energy/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Screenshot_20210912_134641

probot-home-assistant[bot] commented 2 years ago

ovo_energy documentation ovo_energy source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @timmo001, mind taking a look at this issue as it has been labeled with an integration (ovo_energy) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

timmo001 commented 2 years ago

Gas is measured by OVO in kWh, not m³ hence why this measurement does not show up

dave-tucker commented 2 years ago

Hmm I wonder if we could add a value for m3 for this purpose or whether Ha could support kwh for Gas units. Conversion (according to a couple of calculators ftom a quick search) should be as simple as Kwh / 10.5 (sometimes rounded up to 11)

RCGrahamWilmott commented 2 years ago

You cant just divide kWh by 10.5 (or 11) to convert to m3. The exact equation is: [amount of M3] [volume correction factor] [calorific value] / [kWh conversion factor] = [amount of kWh]

volume correction factor = 1.02264 for all UK gas suppliers calorific value must be between 38 and 41 within the UK, with an average of 40. http://mip-prd-web.azurewebsites.net/DataItemExplorer/Index allows for discovering the exact value per location but maybe a bigger job than hard-coding the approx value of 40 kWh conversion factor = 3.6 for all UK gas suppliers

Therfore, to do the opposite and convert back: [gas kWh] * 3.6 / 40 / 1.02264 = approx [gas M3]

You can create a template sensor using something like:

template:
  sensor:
    - name: Gas Consumption (Approx)
      unit_of_measurement: 'm³'
      state: "{{ states('sensor.ovo_last_gas_reading') | float * 3.6 / 40 / 1.02264 }}"
      icon: 'mdi:fire'
      state_class: total_increasing
      device_class: gas
github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.