Both of your use cases do not require any from of smart device and certainly no internet connection.
In fact you could even use an simple analog switch if you want the lights to go on at certain times. And for the hallway I would suggest the tried and true motion sensor.
Sure for really complex logic and a lot of flexibility you might want an micro controller eventually but those are truly niche uses.
"Smart" devices are insanely overengineered for the simple problems they solve and the huge problems they can cause.
> And for the hallway I would suggest the tried and true motion sensor.
By the time I'm in the dark hallway, it's a bit late. "But just add a motion sensor outside!" Yeah, except this is a block of flats and you can't add stuff to the communal areas like that.
> if you want the lights to go on at certain times
I don't. I want the lights to go on -as if we were at home-. Which is "random times depending on which room and what people are doing and if there is cooking going on and ..." Home Assistant learns from smart bulb activations and can simulate our presence effectively.
In fact you could even use an simple analog switch if you want the lights to go on at certain times. And for the hallway I would suggest the tried and true motion sensor.
Sure for really complex logic and a lot of flexibility you might want an micro controller eventually but those are truly niche uses.
"Smart" devices are insanely overengineered for the simple problems they solve and the huge problems they can cause.