Aquarium & terrarium lighting control

I couldn’t find a good blueprint to control the light in my aquarium, so I’ve created my own.

It allows you to set a timer to turn the light on and off with specific values ​​of brightness and color temperature, as well as a peak time and its parameters. The values ​​between these points are calculated and set automatically, giving a smooth and realistic lighting effect that closely follows the natural rhythm of daylight.

For example, it allows you to turn on a soft, warm light in the morning (sunrise) and gradually increase the brightness and temperature throughout the day (peak time) and then decrease the brightness and increase the temperature again until it turns off (dusk).
You don’t need an expensive controller anymore because you have HA. :slight_smile:

https://github.com/SirYasko/HA-Blueprints

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

All comments are welcome.

"Buy Me A Coffee"

1 Like

a couple of years ago this will be a great automation for me, hope in a couple of months can restore my 300 gal planted aquarium

thanks for sharing

keep my fingers crossed

Very nice.
Finally, someone who’s interested in aquarium lighting.
I’ve been trying to find a sensible solution for a while. Unfortunately, I’m still not satisfied. So far, I’ve been using adaptive lighting, but that doesn’t suit me very well.
I use an H801 Tasmota controller to control the two LED lights. I’ll test your project and see if it works for me.

Hello SirYasko,

Thanks for contributing to the community with a new Blueprint.

I have a suggestion for you. Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.
Adding a MY link for this Blueprint to your top post would help them a lot.

Here is the link to make that.
Create a link – My Home Assistant

1 Like

Thank you very much. :+1:
It works very well for me.
One suggestion would be to set the brightness in a range of 0 to 100 percent (it’s currently 0 to 255).
Overall, I’m impressed and now have a lighting control system that I’m happy with.

@SirYasko

Warnings often appear.

Is that the possible reason?

This has worked for me thanks. New to home assistant so i am wondering if it can me made to have different times on the weekend or to make it so you can manually turn the lights on earlier and for the automation to not turn them off because it is out of the time range.

I’ll work on it and let you know

New version (2.0) released!

Removed:

  • warning: Got color_temp argument in turn_on service, which is deprecated and will break in Home Assistant 2026.1, please use color_temp_kelvin argument - Goalach

Added:

  • support for the days of the week on which automation should work - nr002541

Changes:

  • light source from target to entity - you have to set the light source again after updating the blueprint - sorry.
  • extended debug information
  • brightness in percentage instead of 0-255 - Goalach
  • extended range of color temp settings for different lights 1200-9000K
  • reduced transition time to 59 seconds (default 45)
  • some typos
2 Likes

Thanks. i will give it a go tomorrow

Worked Great

Nice blueprint, even though I don’t need it now. I just wrote my own automation based on state of the sun to run sunrise to sunset. Simple and works with light entities or switch entities.
I think people overthink aquarium lighting (and aquariums in general) sometimes. They don’t need fade in fade out, colour changing and all that. These fish are mostly bred in captivity, light turns on at a time in the morning, light turns off at a time in the evening. Nothing fancy. The fish don’t really care about anything else, any other fancy stuff is for the humans and honestly could detract from the happiness of the fish and definitely detract from pant health if you don’t get the right colour spectrum.

It’s your opinion—I have my own.

  1. Sunset and sunrise are not good because in the northern hemisphere (in my location) in winter you have sunrise ca 8:30 and sunset ca 15:30, now in summer sunrise is about 04:00 and sunset 21:00. It’s >10 hours of difference.
  2. In addition, variable lighting allows you to control the growth of plants and algae.
  3. Besides, when sitting on the couch in the evening I prefer the soft warm light from the aquarium that changes slowly until it turns off.
    So as you can see it’s not only for the fish which, as you say, don’t care.

yes you are correct, the fish are bred in captivity, but you are wrong, you want your fish healthy, and for that you need more than turn a strong light suddenly, how will you feel to live in a house where you are sleeping and suddenly someone turn a light at max, that cause stress on any living thing, also light are not for fish is for plants as we want our aquariums like the real thing, !also plants stress¡, if you change the time on your lights from one day to another the plant will stress and little by little die,

if you want a fish in a box and that’s all you are not an aquarist, you are a keeper, a fish is a living thing and you want for them to have a long life

@SirYasko
When lighting is set correctly, it does not need to be changed to control algae. Lighting is only on component when it comes to algae, nutrient level is the larger component.
Do note, I said this was a nice blueprint and I meant that. I also stated a very true fact. A lot of people do overthink fishtank lighting. Sunrise to Sunset works for me, it has worked for many years, my fish are use to that setup. Purely my setup, not saying that works for all. A lot of professional Aquarist just have basic timers that go for a set time. I’ve seen many fish rooms setup with multiple tanks just using timers. A lot of the lights they use are tunable, but many don’t change them once they are set for a certain tank setup.
I appreciate your point of view totally. My comment was my opinion, this is a public forum that many people will find, not just Home Assistant users.

@WarLion
In YOUR opinion I am wrong, and that is purely your opinion with no scientific evidence or studies backing up that varying light makes any difference to the happiness of captive fish.
You are dealing with fish and plants in let’s say maybe 180ltrs of water? Compared to nature, that is a closed box.
With lighting. Turning on a strong light is exactly what humans have done for many many years. Turn on the light switch on the wall, it comes on full brightness from dark or whatever. Dimmers are only a recent addition, and LED lighting even more recent again. Again, the fish are captive bred. The lighting they are used to is on in the morning, off at night. They grew up from the tiniest baby with this and that is what they are accustomed to and no evidence it causes them stress. You’re making the mistake of HUMANISING the fish and using your reasoning. That’s like humanising other pets, right down to the advertisements that use talking dogs or whatever. It’s a big mistake a lot of vet’s will warn you not to make.
I’ve been keeping fish for over 30 years, with tanks varying from 90Ltrs to over 900Ltrs. At the moment I have 6 tanks setup, so I don’t appreciate the fish in a box comment one bit.
I judge my tank and the way my fish are by the health of the fish. When I have some of the Plecos pushing 20 years old now, and most fish I keep living well over there stated approximate life spans, I would say I the fish are healthy.
Before LED’s Fishtanks were lit with Compact Fluorescent lighting. Before that, Incandescent lights were used. All this changing of lighting and everything is a much more recent thing.
I tune my lighting for the tank for sure. If I have a heavily planted tank with plants that love light, I will have stronger lighting. If I have a black water tank (which I do have one tm) that will have much more subdued lighting. Have I had Algal blooms? Of course I have. All people with aquariums have them from time to time. Was it lighting? In 99% of cases no. Mostly it was caused by a nutrient imbalance. Sometimes mistakes by me in my stocking, Not a good enough “clean up crew”.

Anything done with lighting, other than being bright enough for the plants, is purely for HUMAN enjoyment. If having your fishtank double as aesthetic lighting and your fish are happy with that, then go for it, but please do not go out saying I am wrong, because the truth is a lot of people do overthink lighting and what they think will keep the fish happy.

Scientific evidence are you sure there is not?

Why do you say that recreate nature is a humanising the fish?

I had 22 fish tanks (5 to 300gal) at home and a pond with 50cm koi fishs

You said you been keeping fish for 30 years but you are stuck whit 30 years old fish keeper ideas

Simulating sunrise and sunset in an aquarium provides several benefits, primarily reducing stress on fish by providing a gradual transition from light to darkness. This mimics a natural day/night cycle, which can improve fish behavior and potentially reduce algae growth. Additionally, it offers a more visually appealing and natural experience for the aquarist.

Here’s a more detailed breakdown:

Benefits for Fish:

  • Reduced Stress:

A sudden, bright light turning on can startle fish, while a gradual sunrise allows them to adjust more comfortably to the light cycle.

  • Improved Biological Clock:

Consistent light cycles help regulate fish’s natural behaviors, such as feeding and sleeping patterns.

  • Potential for Reduced Algae Growth:

By shortening the “peak” light period, you might see less algae growth, especially if you have live plants.

Benefits for the Aquarist:

  • Enhanced Viewing Experience:

A gradual sunrise and sunset can be aesthetically pleasing and make the aquarium more enjoyable to observe.

  • Convenience:

Automated sunrise/sunset settings can simplify aquarium maintenance, as you don’t have to manually adjust the lights.

  • Flexibility:

Some aquarists enjoy having the flexibility to adjust the light schedule to suit their viewing preferences and tank needs.

Important Considerations:

  • Fish Species:

Some fish species, especially nocturnal or very sensitive ones, might benefit more from a gradual sunrise and sunset.

  • Plant Needs:

While plants don’t require a perfect simulation of natural light, consistent lighting over a 6-12 hour period is beneficial for growth.

  • Algae Control:

If you have a planted tank, you’ll need to balance the light duration with potential algae growth.

In conclusion, while not strictly necessary, simulating a sunrise and sunset in an aquarium offers various advantages for both the fish and the aquarist, primarily by promoting a more natural and stress-free environment.

1 Like

Personally my fish get frantic if the lights suddenly come on . All the evidence i need that they prefer the light to slowly come on. Not to say the fish wouldn’t get used to it but why put people off providing a better environment

@nr002541
My fish go frantic every time I go near the tank lol. They think it’s food time.
I think I made a mistake of training my fish that light on equals food time though as well, and I likely don’t want them to think that, but it is what they know now and I have to work around the fish to a certain extent :).

I totally understand your situation though. I have some sensitive fish too, and although they don’t get bothered by the lights, the tend to fly off and hide in the rocks whenever someone other than me goes anywhere near the tanks.

As far as providing a better environment… Well, the fish people buy are already use to the on / off routine, and it’s been that way ever since Aquarium’s were invented. What my initial point, that got kind of very blurred was, that you don’t need a blueprint / home assistant / complex lighting to keep fish.

I came across this post here and I do not even use Home Assistant. I read about the blueprint thought it was a good blue print (and made that comment) then added that general people don’t need to over think it.
I was just doing general lighting research as I do sometimes to see what new LED colours are being used in the industry

@WarLion
Source for your very detailed post?
I have seen plenty of Aquarium sites with similar information, generally ones trying to sell specific lighting or systems.
I did state light is not the only factor with Algae. I did not state it was not a factor at all. Nutrient load is a bigger factor, so focusing on lighting alone is not a good way to control algae. If you have excess algae in your tank, you need to look at nutrient load and what you have as your clean up crew, such as shrimp, snails, algae eating fish ( bristle nose pleco’s do a great job of cleaning up Algae ).
If you are going to paste a whole heap of info like you did, would be very good,to acknowledge your source.