The kWh meter currently has no API. HomeWizard has promised that they are working on that.
When the API is available, I will off course add support for the kWh meter !
The kWh meter currently has no API. HomeWizard has promised that they are working on that.
When the API is available, I will off course add support for the kWh meter !
Due to the change in the setup flow (from manual to Discovery), I had to change some internal stuff. These changes made the it that the old configuration was not usable.
But… I have added a ‘migration’ method so upgrading without losing data should be possible. This fix is added in Release 0.5.0-beta-6. Anyone want to test this to see if there are (breaking) issues that I’ve missed during testing? To help me:
Installed it with HACS, all ok , no issues after reboot…
Like to test this. How can I update to the beta? Just delete the custom component and reinstall with the beta files? I like to keep the history.
Do you make use of HACS? Then you can simply select ‘re-install’ and then ‘show beta versions’. Otherwise just replace the files indeed.
But, if you want to make sure you keep your history, don’t install the beta. It’s called beta because I want to make sure nothing gets deleted after installation!
I tried to use your code but I have my config split up.
No errors, but unfortunately it does not show the cost. (al sensors stay zero)
Under integrations I have a sensors.yaml file with :
sensor: !include_dir_merge_list ../entities/sensors
and a utility_meters.yaml with:
utility_meter: !include_dir_merge_named ../entities/utility_meters
I made a homewizard.yaml file in the \entities\sensors\ folder containing:
#Export electra
- platform: template
sensors:
energy_export_t2_dagelijks_eur:
friendly_name: 'Opbrengsten vandaag nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_export_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_export_t1_dagelijks_eur:
friendly_name: 'Opbrengsten vandaag dal tarief (T1)'
value_template: "{{ (states('sensor.energy_export_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_export_total_dagelijks_eur:
friendly_name: 'Opbrengsten export vandaag dal + normaal'
value_template: "{{ (states('sensor.energy_export_t2_dagelijks_eur')|float + states('sensor.energy_export_t1_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_export_total_dagelijks_kwh:
friendly_name: 'kWh export vandaag dal + normaal'
value_template: "{{ (states('sensor.energy_export_t2_dagelijks_eur')|float + states('sensor.energy_export_t1_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "kWh"
#import electra
- platform: template
sensors:
energy_import_t2_dagelijks_eur:
friendly_name: 'Kosten import vandaag nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t1_dagelijks_eur:
friendly_name: 'Kosten import vandaag dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_total_dagelijks_eur:
friendly_name: 'Kosten import vandaag dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_dagelijks_eur')|float + states('sensor.energy_import_t1_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_total_dagelijks_kwh:
friendly_name: 'kWh import vandaag dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float + states('sensor.energy_import_t2_dagelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
#Netto electra (kosten - opbrengsten) Bij teruggave zal er '-' zichtbaar zijn
- platform: template
sensors:
energy_total_dagelijks_eur:
friendly_name: 'Kosten vandaag electra'
value_template: "{{ (states('sensor.energy_import_total_dagelijks_eur')|float - states('sensor.energy_export_total_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
#import gas
- platform: template
sensors:
energy_gass_eur:
friendly_name: 'Kosten vandaag gas'
value_template: "{{ (states('sensor.energy_gas_dagelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
#Totale netto kosten (Gas + electra)
- platform: template
sensors:
energy_gas_en_elektriciteit_eur:
friendly_name: 'Totale netto kosten energie'
value_template: "{{ (states('sensor.energy_gass_eur')|float + states('sensor.energy_total_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
In the file \entities\utility_meters\homewizard.yaml
energy_import_t2_dagelijks:
source: sensor.p1_meter_total_power_import_t2_kwh
cycle: daily
energy_import_t1_dagelijks:
source: sensor.p1_meter_total_power_import_t1_kwh
cycle: daily
energy_export_t2_dagelijks:
source: sensor.p1_meter_total_power_export_t2_kwh
cycle: daily
energy_export_t1_dagelijks:
source: sensor.p1_meter_total_power_export_t1_kwh
cycle: daily
energy_gas_dagelijks:
source: sensor.p1_meter_total_gas_m3
cycle: daily
And I created the input_number entities with ‘helpers’
Can someone tell me what I do wrong ?
(I have the ‘tarieven’ filled in)
If I’m correct you need to remove kwh from the utility meters
sensor.p1_meter_total_power_import_t2_kwh your sensor should be sensor.p1_meter_total_power_import_t2 in HA
Hi guys,
Anyone else having the same problem? I removed it & installed it again. Also rebooted my router but the connection is still failing. It works fine for weeks
<ip>/api/v1/data
)Hi thanks for the reply!
HA running on 2021.1.5
Homewizard running on 0.4.2
But it’s fixed now, everything works again. I went into custom_components and deleted the folder and inside HA i deleted the intergration. After a re-boot i installed it again and not it works.
Still strange, but ok! Good to hear that it works again!
Bullox, coud you share your code with us?
I am searching for this solution for ages.
Thanks in advance!
hey! what are you using for you ‘actueel verbruik’ graph/bar/…
It’s the ‘Meter’ (gauge) card
- type: gauge
entity: sensor.p1_meter_active_power
max: 5000
name: Actueel verbruik
min: -5000
severity:
green: 600
yellow: 2000
red: 3000
Hi Fabian,
Thank you for your reply.
I didn’t see it earlier, sorry.
Problem solved!
Sometimes you are so focused on certain things that you miss the simple details
Thanks!
sigh
sometimes it’s just in front of your eyes… thanks!!
Do you mean the monthly usage?
I mean the whole config to get that result
Did a re-install via HACS all went well. Cheers
Thank you for testing!
I am waiting for this PR to be accepted or this issue to be solved. At this moment this integration will show up as ‘new’ for every HACS user, even when dismissing. This should be solved when the PR is merged. Then I will release v0.5.0 to everyone