Aquarium - Turn on a switch to activate Doser Equipment for a certain amount of Volume or Time. Automation

This script is intended to dose your aquarium for a certain amount of time. Choose an entity to turn on, typically a 2 part Doser @ 1.1 mL/min, then set the amount of time to dose for. The script will turn on the target switch for the set time, then the switch will turn off.
IMPORTANT: Use the Supplemental Automation as these scripts only work when Home Assistant powered on is connected to the switches, otherwise, a switch could turn on, and if Home Assistant is disconnected, it may fail to turn off the switch, and cause overdosing. To prevent this, use the app that is dedicated for the switch to turn off the doser at a certain time. Some switches will save the schedule on-board in case of a wifi loss.

With the paired automation, select the script you just created and a doser switch used in that script with a max time (default is 30 minutes). This will be triggered whenever the doser switched is turned on manually or outside of Home Assistant as well as turn the doser switch off when the max time has been exceeded. Prevents doser from overdosing.

Typical 2 Part Doser:

Set by Volume

Script:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Daily Automation:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Set by Time

Script:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Daily Automation:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Supplemental Automation to be used with either script (above), to prevent overdosing, even when switch is turned on manually:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

The Blueprint:

Volume

Script:

Time

Script:

Daily Automation:

Automation

Created for AquaPi

1 Like

I would like to ask you to add seconds

I’ll look into it. In the meantime, you can apply the time in . 5 increments, so at 30 second intervals.

Heya! I made another blueprint that sets the On time based on the dose rate and dose amount, so it should time it right to the nearest second. Testing sems to work fine, lemme know if you try it out and how it works.

Also, I changed the original blueprint’s time input to a duration selector so you should be able to narrow it down to seconds as needed now!

i did one using the node red addon and it works really well. i did the dosers measurements by timing the output of the pump over a duration of time.

(chemical in mls / 0.83) * 1000

same, I made another blueprint that does that behind the scenes, so you should be able to enter the volume amount and the dose rate (typically 1.1 mL/min) and get the dose time. So I added an option to also adjust the dose rate to work with any type of pump that you can just turn off and on. I also use Atlas Scientific EZO-PUMPS for water changes and precise dosing.

1 Like