Hello,
I’m new to HA and I’ve done a lot of research but I haven’t been able to find a solution to my problem:
I have a water tank and a pump that are not connected to HA. This pump is activated when the water level in the tank drops and turns off when the tank fills.
I recently installed an ultrasonic sensor (using EspHome) in the tank to check the water level.
My question is: how do I save the date and time of the last time the pump filled the tank? The only sensor I have is the ultrasonic one and with it I can see the exact moment when the water level starts to rise and stops when it fills completely on the graph. But I would like to display on my dashboard the last moment when the level stopped rising. The image below shows the sensor graph and the exact moment I would like to display on the dashboard.
You could create a triggered template sensor,
template:
- trigger:
- platform: numeric_state
entity_id: sensor.your_tank_level # replace this with your entity
above: 95 # adjust this
sensor:
- name: Tank Last Filled
state: "{{ now() }}"