top of page
automations.png

Automations

Using all the data available you can create your own automations. Either time activated for lights for example or maybe a feed button to turn off pumps to feed your fish, you can also create automations that run in the background all the time like an ATO or maybe a float switch to turn off your skimmer if it fills up. The possiblities are endless.

Automation Possibilities Are Endless...

One of the biggest advantages of using Home Assistant is the flexibility it gives you when creating automations. Whether you're building a simple timer-based task or a complex system that reacts to multiple sensors and conditions, the possibilities are almost limitless.

With that flexibility comes responsibility. It's important to think carefully about how each automation is triggered, how it behaves, and just as importantly, how it resets or deactivates itself.

For example, you might create a Feed Mode button that temporarily turns off your return pump and powerheads while feeding your fish. That's straightforward enough—but what happens next? You'll also need an automation that turns everything back on after a set period of time. Taking a few moments to consider the complete sequence helps ensure your aquarium remains safe and reliable.

laptop.png

The real power of Home Assistant is that you can create automations tailored specifically to your own reef system. Temperature control, automatic top-off systems, leak detection, lighting schedules, maintenance reminders, dosing control, emergency shutdown procedures, notifications, and much more can all be automated. If you can define the conditions and the desired outcome, there's a good chance Home Assistant can make it happen.

Below is a practical example showing the logic involved in creating an Automatic Top-Off (ATO) automation. This demonstrates how sensors, conditions, and equipment work together to maintain a stable water level automatically.

We'll then explore two different ways to create automations:

1. Using the Home Assistant Automation Editor

The built-in Home Assistant interface provides a powerful visual editor that allows you to create automations without writing code. You simply select triggers, conditions, and actions through an easy-to-use graphical interface.

2. Using ChatGPT for Assistance

If you'd prefer not to build automations manually, ChatGPT can help generate the required YAML code for you. Simply describe what you want the automation to do, review the generated code, and paste it directly into Home Assistant. This can be a great way to learn while dramatically speeding up the process.

The examples shown here are only the beginning. Once you're comfortable with the basics, you'll discover that your reef controller can be customised to do almost anything you can imagine.

ATO (Auto Top Off)

What Sensors Are Needed?

  • Main sump water level sensor (Optical)

  • Failsafe sump low-level sensor (Float)

  • Failsafe sump high-level sensor (Float)

Having an Automatic Top-Off (ATO) system on your reef tank is one of the most valuable automations you can implement. As water evaporates from the aquarium, only pure water is lost—salt remains behind. Without regular top-off, salinity will slowly rise, potentially stressing corals and livestock.

An ATO system automatically replaces evaporated water from a freshwater reservoir, keeping the sump water level and salinity stable throughout the day. Not only does this improve stability, but it also removes the need for daily manual top-offs.

For the Marine Assistant system, the sensors are mounted using a purpose-designed 3D printed magnetic bracket, allowing them to be positioned securely inside the sump while remaining easy to adjust and maintain.

Before continuing, ensure all sensors have been installed correctly and enabled within your ESPHome configuration. Verify that each sensor changes state correctly in Home Assistant before attempting to create any automations.

How It Works

The optical sensor acts as the primary water level sensor. When the water level drops below the desired level due to evaporation, Home Assistant activates the ATO pump and transfers fresh RO/DI water from the reservoir into the sump.

Once the optical sensor detects that the correct water level has been restored, the pump is switched off automatically.

To improve reliability, two additional float switches are used as independent safety devices:

  • The Low-Level Float Switch can be used to detect abnormal water loss or pump failures.

  • The High-Level Float Switch acts as an emergency stop, immediately disabling the ATO pump if the water level rises too high.

This layered approach provides multiple levels of protection against sensor failures, pump faults, and unexpected operating conditions.

Building the Automation

The automation itself is relatively straightforward:

1. Monitor the optical water level sensor.
2. If the water level falls below the desired point, turn on the ATO pump.
3. Continue topping off until the optical sensor reports that the water level has been restored.
4. Immediately stop the pump.
5. Override the process if either failsafe float switch is triggered.

You may also wish to add additional safeguards such as:

* Maximum pump run times.
* Reservoir-empty detection.
* Notification alerts when topping off.
* Alerts when a failsafe sensor is activated.
* Logging of daily top-off volume.

Method 1: Using the Home Assistant Automation Editor

The easiest way to create an ATO automation is using the built-in Home Assistant Automation Editor.

Using the visual editor, you can create triggers based on the optical sensor changing state, then define actions that turn the ATO pump on or off. Conditions can be added to ensure the failsafe sensors are in a safe state before the pump is allowed to run.

This approach requires no programming knowledge and is ideal for users who prefer a graphical interface.

Method 2: Using ChatGPT to Generate the Automation

If you prefer, ChatGPT can help generate the required Home Assistant YAML code for you.

Simply describe your setup and requirements, for example:

> "Create a Home Assistant ATO automation using an optical water level sensor, a low-level float switch, a high-level float switch, and a switch controlling my ATO pump."

ChatGPT can then generate a complete automation that can be reviewed, modified if required, and pasted directly into Home Assistant.

This is often the fastest way to create more advanced automations while also helping you learn how Home Assistant automations are structured. Be sure to include as much information as you can, entity names for example are really important.

Taking It Further

Once your ATO is working reliably, you can begin adding more advanced features such as maintenance modes, leak detection integration, reservoir monitoring, alarm notifications, and automatic system shutdowns.

The example shown here is intentionally simple, but it demonstrates the core principle behind most reef automation projects: monitor a sensor, make a decision, and perform an action. Once you understand that process, you can automate almost any aspect of your reef system.
 

render.png
bottom of page