I am trying to set up the utility_meter integration with two tariffs. The problem is that even when one of the tariffs is selected, the sensors for both tariffs get updated.
I am getting the source energy reading from a Shelly 1/PM which measures kW minutes. So I have created the sensor as follows to get kWh’s:-
platform: mqtt
state_topic: "shellies/shelly1pm-E6468B/relay/0/energy"
name: "Shower Room Heater Energy"
unit_of_measurement: "kWh"
value_template: "{{ (value | float * 0.000017) | round(2) }}"
force_update: true
I then set up the utility_meter sensor’s as follows:-
shower_room_heater_monthly_energy:
source: sensor.shower_room_heater_energy
cycle: monthly
tariffs:
- Creuse
- Pleine
This then gives me 2 sensors:
- sensor.shower_room_heater_monthly_energy_pleine
- sensor.shower_room_heater_monthly_energy_creuse
I the have a Node Red flow that changes between the pleine and creuse tariff using the select_tariff service. This seems to be working as the sensors are showing a status of ‘paused’ for the creuse sensor and ‘collecting’ for the pleine sensor.
However, both the pleine and the creuse sensor’s show the same value and when I turn the heater that is being monitored on they both increment at the same rate. I was expecting only the sensor for the currently active tariff would be affected.
Any ideas please?