Home Assistant beginners

What’re you trying to do? Measure the electricity usage and cost of individual devices or your home as a whole?
Individual device tracking through the Tapo plugs I have and an overall cost with history.

I've got this so far.

pmTnOXl.png


I've installed the Octopus Energy Integration along with PowerCalc but I have absolutely no idea where to go from here.

I'd like to be able to see the energy usage and associated cost of each of the Tapo plugs (will be adding some more today) along with with history. So I can look back and [for example] see that my office used xx kW of electricity last Wednesday and it cost me £xx.xx.

I'd like to see the same for the entire home as well.
 
You can try adding something like this to your config yaml (get the Studio Code Server add-on from the Add Ons page).

template:
- sensor:
- name: "Cost today"
unit_of_measurement: "£"
state: >
{% set consumption = states('sensor.garden_room_ac_today_s_consumption') | float %}
{% set rate = states('sensor.dcc_sourced_smart_electricity_meter_rate') | float %}
{{ ((consumption * rate)) | round(1, default=0) }}


Then go to dev tools and refresh your YAML

You can then add "Cost today" as a sensor to a widget (you can give them all unique names).

Might need some trouble shooting depending on how your Octopus plugin reports tariff. But that'll take the current value and multiply by the current consumption.

Edit: seems to be working @Feek

SyKyClC.png
 
Last edited:
A few weeks ago I transferred all my Hive TRVs, boiler control, and thermostat to Zigbee2MQTT with minimal issues. Today I completed the transfer of all my Hue devices - bulbs (Hue and Innr), four switches and a couple of motion detectors. The hardest thing was altering my various automations to pick up the new device names. In total it only took me about four hours. The only thing that tripped me up was that the latest update to Zigbee2MQTT (version 2) meant the switch buttons weren't exposed and I had to turn on Home Assistant Experimental Event Entities in Zigbee2MQTT.

The advantages of Hive and Hue devices on the Zigbee2MQTT network is that I now have only one Zigbee network instead of three which should greatly reduce Wifi and Zigbee interference. The Hive hub especially seemed to put out a very strong signal or was perhaps on a channel that interfered with the wifi as when it was turned off, I noticed stronger and more stable connections for my 2.4Ghz wifi devices. The other advantage is that now that Hive and Hue both required cloud connections to work with HA. Now this has been removed and everything is now local, operations are noticeably faster eg Press a smart light switch and the light comes on instantaneously rather than there being a brief delay.

In short, if you're starting out with HA then consider a Zigbee dongle mandatory and work from there!
 
Edit: seems to be working @Feek

Oh good, thanks.

I couldn't use the file editor you suggested, it seems to crash the HA Pi - I'm only using an old 3B for this as my spare 4 is now being used elsewhere. If I can get it to do what I want, I'll use a better device.

Error loading /config/configuration.yaml: while scanning for the next token
found character '%' that cannot start any token
in "/config/configuration.yaml", line 20, column 2

I edited the two lines with what I think are the correct choices.

JZxASX7.png
 
<snip>

Your/ Dlockers indentation hasn't translated correctly on the copy and paste. @dlockers - if you use the code insert button then the YAML should be correct and Feek can copy/ paste it right into his config file
 
Code:
template:
  - sensor:
      - name: "Cost today"
        unit_of_measurement: "£"
        state: >
          {% set consumption = states('sensor.garden_room_ac_today_s_consumption') | float %}
          {% set rate = states('sensor.octopus_energy_electricity_19l2262519_1012474423759_current_rate') | float %}

          {{ ((consumption * rate)) | round(1, default=0) }}

I'm not sure it is working but that could be because I am selecting the wrong sensors - the maths seems to be OK and I think the path I am following is OK though. Will troubleshoot

(I just checked and its stuck at £1)
 
Last edited:
Back
Top Bottom