Works for me
I have a Wemo setup of bulbs, sensor and switches. My home office has a mechanically switched heater which I turn on when cold so the rooms warm when I go in. (If necessary, I use my Netatmo weather system to tell me the temperature). It logs the power usage so I could claim expenses / allowances if I wished. I have a switch running an outside light so I can turn it on when I arrive home, beyond sensor range, for the walk up the drive. A bulb in the hall comes on, at 50% brightness, at 30 minutes before sunset and off at 11.30. If I go to bed earlier then I can turn it off after it illuminates getting upstairs, where there is no switch for it. The sensor lets me trigger heayer / lights etc. separately using IFTT.
The bulb in the bedside lamp dims over 5 minutes when I go to sleep.
Works for me.