henkie
(Henk)
April 16, 2024, 4:41pm
1
Dear all,
I’ve already searched here but unfortunately I can’t find it.
I would like to create a sensor in configuration.yaml.
This sensor is a kWh sensor for which I would like to have the euro price.
1 sensor for the monthly amount
and 1 sensor for yearly amount
but I can’t make this.
Could you perhaps give me an example or help me on my way, as I would greatly appreciate this.
with kind regards,
Henk
francisp
(Francis)
April 16, 2024, 4:53pm
2
A template sensor to calculate kWh * price
A utility meter to get the price monthly and yearly
if you don’t need the ongoing price, and just a monthly and yearly amount, you don’t even need the template sensor.
henkie
(Henk)
April 16, 2024, 5:07pm
3
thank you Francis,
I already found this but I don’t understand it.
how to make this work
If anyone has an example that I can work with, that would be a great help.
with kind regards,
Henk
miwyf
(MiWyf)
April 18, 2024, 4:44am
5
sensor:
- platform: template
sensors:
meter_energy_daily_money:
unit_of_measurement: '¥'
value_template: "{{ ( states('sensor.meter_energy_daily')|float * 0.62 ) | round(2) }}"
meter_energy_monthly_money:
unit_of_measurement: '¥'
value_template: "{{ ( states('sensor.meter_energy_monthly')|float *0.62 ) | round(2) }}"
cabinet_meter_energy_daily_money:
unit_of_measurement: '¥'
value_template: "{{ ( states('sensor.cabinet_meter_energy_daily')|float * 0.62 ) | round(2) }}"
cabinet_meter_energy_monthly_money:
unit_of_measurement: '¥'
value_template: "{{ ( states('sensor.cabinet_meter_energy_monthly')|float *0.62 ) | round(2) }}"
miwyf
(MiWyf)
April 18, 2024, 4:47am
6
utility_meter:
meter_energy_hourly:
source: sensor.meter_importenergy
cycle: hourly
meter_energy_daily:
source: sensor.meter_importenergy
cycle: daily
meter_energy_monthly:
source: sensor.meter_importenergy
cycle: monthly
cabinet_meter_energy_hourly:
source: sensor.cabinet_meter_importenergy
cycle: hourly
cabinet_meter_energy_daily:
source: sensor.cabinet_meter_importenergy
cycle: daily
cabinet_meter_energy_monthly:
source: sensor.cabinet_meter_importenergy
cycle: monthly
henkie
(Henk)
May 11, 2024, 7:20pm
7
thanks for your info.
sorry for my late response.
I’m going to try this
thx
gr
Henk