Advanced Automation – Smart Water Tank with TUYA Ultrasonic Sensor + Home Assistant

Hi everyone,

I want to share another real-world automation project I use at home, this time for smart water tank monitoring using a TUYA ultrasonic sensor integrated with Home Assistant.

Watch on YouTube

:tv: Channel: Home Assistant PC
Technical content, straight to the point and without unnecessary details.

The sensor measures water height, and all the β€œmagic” happens within Home Assistant,
where I convert the data into liters, consumption, costs, and visual automations.

:open_file_folder: Project repository on GitHub

:wrench: What is shown in the project and video

  • Physical installation of the ultrasonic sensor in the water tank
  • Integration of the TUYA sensor into Home Assistant
  • Conversion of percentage to liters
  • Custom sensors (input, output, and variation)
  • Utility Meter (daily, monthly, annual)
  • Calculation of consumption and cost in reais (Brazilian currency)
  • Identification of water supply from the utility company
  • Last supply with formatted date
  • Alert automations (low, medium, and critical levels)
  • Advanced visual cards with color-coded indicators
  • Functional and organized dashboard for daily use

Everything done practically, with real examples, exactly as I use it in my environment.

If anyone wants to adapt it for another type of tank, another sensor, or discuss improvements to the calculation and cards, I am available.