Not at all. I think it was clear what you were asking to accomplish with your small test program, and it is good idea for you to get the fading working with just such a small program.
Your prose description is useful and does make it unambiguous.
I think your test program will
- fade up when a button becomes pressed.
- fade down when another or the same button becomes pressed.
A simple fade up (or down) over thirty minutes will blind your program to additional or changed inputs that would inform alternate activity.
This may not be a bad thing! If the goal is to fade up, and you don't care if, say, the sun goes behind a load, a simple fading routine that takes all the steps before being able to even realize the sun has gone away will do fine.
Similarly for fade down.
If you need to be able to interrupt the fading sequence(s) due to chaining conditions, it gets a wee bit more complicated.
Right now, @GoForSmoke has written something that could be expanded a bit, even naively by using it to create two functions, fadeUp and fadeDown.
And responding once to a button only when it becomes pressed is fairly straightforward.
One thing I see in some code somewhere above is the possibility that the lights will go full on instantly, let us be sure the anything yo deploy is very clearly not gonna do that.
So first, will blind "Imma finish this" dedicated fading work? If so, or even if not, maybe starting with such (in isolation! as you are doing) would be instructive.
Meanwhile, take a look at the basic examples in the IDE. In particular, button and debounce under the digital submenu of the example menu item of the File menu. And maybe state change detection.
edit: I see you do want the light to just go on, so never mind about that, and there’s no fade up that I see, but I’ve been having trouble seeing lately, so.
You may find that an LDR alone may not be enough to assure the operations you want. It would not be at all difficult to plan that your circuit and program include an RTC module. They are cheap and easy to work with, this would let you do sunrise and sunset by time perhaps also assisted by ambient light conditions.
But maybe first things first.