Closed spoetnik closed 2 years ago
Hey there and thanks for the contribution! :+1:
I've fiddled with this a couple months ago but did not manage to get this to work, seems like I wasn't using the device_class: energy
statement. I've then settled on (ab)using the utility_meter
integration myself, but this is much better cleaner
Could you fix this for gas as well?
Update: This should fix gas
- platform: mqtt
name: P1 Gas Usage
unique_id: 'sensor.p1_gas_usage'
device_class: gas
state_class: total_increasing
unit_of_measurement: 'm³'
state_topic: "sensors/power/p1meter/gas_meter_m3"
value_template: "{{ value|float / 1000 }}"
The superscript m³ is important.
Fixes https://github.com/daniel-jong/esp8266_p1meter/issues/10#issue-1038873285