Im new to esphome so at the moment Im cutting and pasting stuff and then just playing around with it.
Ive created a water flow meter based off the home assistant glow project and it works from the way I need it to, but for some reason I cant seem to get the total flow id: sensor_flow_meter_total_litres_3
to reset and update the value in home assistant on the button push.
It does reset until there is a new pulse from the physical sensor.
Could someone offer some guidance as to where I should be looking to reset the flow_meter_total_litres_3
???
button:
- platform: template
name: flow_meter_reset
id: button_reset_total
on_press:
then:
- pulse_meter.set_total_pulses:
id: sensor_flow_pulse_meter_3
value: !lambda "return id(select_reset_total).state * id(select_pulse_rate).state;"
sensor:
- platform: pulse_meter
name: flow_meter_total_consumption_3
id: sensor_flow_pulse_meter_3
force_update: true
unit_of_measurement: 'L'
state_class: measurement
icon: mdi:flash-outline
accuracy_decimals: 0
internal_filter: 20us
internal_filter_mode: pulse
pin:
number: GPIO13
mode:
input: true
pullup: true
total:
name: flow_meter_total_litres_3
id: sensor_flow_meter_total_litres_3
force_update: true
unit_of_measurement: 'L'
state_class: total_increasing
accuracy_decimals: 0
filters:
- lambda: return x * (1.0 / id(select_pulse_rate).state);