Dear all,
I read the values: consumption high and low tariff and injection high and low tariff harvested from my P1 meter over mqtt.
In my dashboard both the values of injection differ from both the consumption values, the injection has 3 decimals, the consumption has 2 decimals but al the payloads are divided by 1000.
The P1.yaml file
mqtt:
sensor:
- name: P1 Consumption High Tariff
unique_id: 'sensor.p1_consumption_high_tariff'
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state_topic: "sensors/power/p1meter/consumption_high_tarif"
value_template: "{{ value|float / 1000 }}"
- name: P1 Return Delivery Low Tariff
unique_id: 'sensor.p1_delivery_low_tariff'
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state_topic: "sensors/power/p1meter/returndelivery_low_tarif"
value_template: "{{ value|float / 1000 }}"
- name: P1 Consumption Low Tariff
unique_id: 'sensor.p1_consumption_low_tariff'
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state_topic: "sensors/power/p1meter/consumption_low_tarif"
value_template: "{{ value|float / 1000 }}"
- name: P1 Return Delivery High Tariff
unique_id: 'sensor.p1_delivery_high_tariff'
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state_topic: "sensors/power/p1meter/returndelivery_high_tarif"
value_template: "{{ value|float / 1000 }}"
the dashboard:
type: entities
entities:
- entity: sensor.p1_consumption_high_tariff
name: Verbruik dag
- entity: sensor.p1_consumption_low_tariff
name: Verbruik nacht
- entity: sensor.p1_return_delivery_high_tariff
name: Geleverd dag
- entity: sensor.p1_return_delivery_low_tariff
name: Geleverd nacht
title: kWh meter
The results of the numbers:
There are no particular error messages in the “file editor” logfile .
If I check the payload with mqtt studio they are all 7 digit numbers without decimal point or comma.
What am I doing wrong or missing?
Thx