There is no better way to learn electronics and coding than building and programming your own devices. Adafruit publishes simple guides for IoT projects all the time. Their latest one shows you how to build your own smartphone controlled robotic light switch. It involves using CircuitPython running on the Feather nRF52840 Express and Crickit FeatherWing to flip the switch with a servo motor.
The Adafruit Bluefruit app runs on your iOS/Android device. Once you have completed the project, you can turn your lights on/off from your smartphone with a simple tap.[instructions]