Shelly Uni: Wi-Fi bistate for Water Level

NOTE
This post is a Wi-Fi variant of post IKEA Trådfri Hack: Zigbee bistate for Water Level

BILL OF MATERIALS

  • 1pc 1 KOhm resistor
  • 1pc 10 KOhm resistor
  • 1pc Water level sensor XKC-Y25-NPN 5V-12V
  • 1pc 12 Volts power supply
  • 1pc Shelly Uni

THE BREADBOARD

THE SHELLY UNI & HOME ASSISTANT
After pairing your Shelly Uni to your Wi-Fi, add Shelly integration to Home Assistant (Settings → Devices & Services). Home Assistant should detect your Shelly Uni automatically.

The device shall have a name similar to shellyuni-12345678A9BC channel 1.
This device is of type switch.

Now you can add a Button Card to your Home Assistant to get something like this:
image

(icon hydraulic-oil-level)

CONSUMPTION
This setup consumes 30 mAh when water is detected.
For lower consumption see the link in the note above.