Look at the example here (a state-based template sensor).
Can somebody please tell me what i am doing wrong with the gas meter?
It does not takeover the number of decimals?
I had to make my own nuts meter helper but also make my own sensor
- sensor:
- name: Monthly_Gas_Meter_in_m3
unit_of_measurement: L
device_class: current
state_class: measurement
state: >
{{ states('sensor.monthly_gas_meter') | float(default=0.0) | multiply(1000) | round(0)}}
How do i file a bug report?
Or am i doing it wrong?
i created a helper for a nuts meter and this is itβs current value:
when i use it in the energy dashboard it is presented as KW (and incorrect with a dot):
And when i make it of m3 measurement:
And no matter what i do, i can not make it with a comma β3,767β
i tried to trick it with some custom sensors like:
- sensor:
- name: Weekly_Gas_Meter_in_m3_3
device_class: current
state_class: measurement
state: >
{% set raw_value = states('sensor.weekly_gas_meter') %}
{{ (raw_value | replace(',', '') | float(default=0.0)) / 1000 }}
Which results in:
0.003767
so then i can use the m3 unit again in the meter but then it will present it with a β.β (dot) as wel.
Can anybody please help me out het?
It drives me nuts to see 1 β.β where there should be a β,β.
Thanks in advance!
Did you find a solution? I faced have exactly the same issue.
No, I went back to native chrome and all works fine
Hello there, I started having trouble with displaying gas consumption. Any suggestion might help. In included screenshots you may see the sensor is correct, but in the dashboard it displays wrong:
Here is the setup in the card:
individual:
- entity: sensor.gas_meter_daily
display_zero: true
name: Plyn
icon: mdi:fire
unit_of_measurement: mΒ³
calculate_flow_rate: true
inverted_animation: true
color_value: false
color:
- 157
- 11
- 11
color_icon: false
decimals: 0
display_zero_state: true
unit_white_space: true
use_metadata: false
secondary_info: {}