unlobito / ha-hildebrandglow

PRE-RELEASE. HomeAssistant integration for the Hildebrand Glow smart meter HAN for UK SMETS meters.
MIT License
54 stars 31 forks source link

Pulling tariff information #49

Open pete-leese opened 2 years ago

pete-leese commented 2 years ago

How do we get tariff information via this integration?

I can see in the bright app this is available as shown below following the installation of the GlowStick

56CF86F5-736C-4C59-B65C-9960068AE5E3

craigmcgowan commented 2 years ago

Hi,

If you see the other issue youve posted about today - https://github.com/unlobito/ha-hildebrandglow/issues/47 - youll notice I have had the same experiences as you. Im using the DCC integration to get this information instead.https://github.com/HandyHat/ha-hildebrandglow-dcc

pete-leese commented 2 years ago

Nice one @craigmcgowan suppose it is better than nothing! :)

would you mind posting screenshot of what you configured in HA in terms of which entities you are using please to configure energy?

Got anything else set up using metrics from this?

craigmcgowan commented 2 years ago

Sure...

So from this integration im only pulling in the power consumption. Other two entities (the dodgy energy consumption and non-working gas consumption I have disabled)

image

In the aforementioned handyhat fork integration then, I have 4 devices - 2 x electric meters and 2 x gas meters. This matches the "devices" in the Android App too. Im not sure why they are duplicated - they werent until I installed by glow stick today.

So ive disabled the entities from the two duplicate devices, and for gas an electric ive got pretty much the same entites.

image

In the Home Assistant Energy then - ive just used the yearly energy feed (I think this is correct) and the rate.

image

This is mirrored for both Gas and Electric.

Ive then made a template sensor to work out the current cost per hour of the electric im using, which is shown my own lovelace view in case its of interest by the gauge.

image

The code for this is below.

  - platform: template
    sensors:
      power_consumption_price:
        friendly_name: "Power Consumption - Price"
        unit_of_measurement: "£"
        value_template: >-
          {{ ((states('sensor.glow_power_consumption') | float / 1000 * (states('sensor.electric_tariff_rate') | float)) + ((states('sensor.electric_tariff_standing')| float) / 24))| round(2) }}

As a note - its correct that I havent used any Gas today - this isnt an error with any integration - it matches my Bright app data

Let me know if youd like to see anything else!

Have a good weekend!

townsmcp commented 2 years ago

@craigmcgowan i had the same - 4 devices now when I have glow stick compared to before of just using DCC connection. This is because 2 are DCC connected and therefore only get updated every half hour, and the other 2 are direct mqtt connected so pull data in real time direct from Hildebrand via the glow stick (the DCC integration does say it supports both connection types).

Also, just an fyi, I think you should be using Electric consumption today and gas consumption today in the energy dashboard