
The device on ATtiny13, controlled by a program of 290 16-bit words, written in assembly language, memorizes the codes of the six buttons on the remote control and turns on / off three loads.
Scheme:

')
The standard IR receiver TSOP1740 uses inverse logic, and this is taken into account in the program. Received signals cause an INT0 interrupt. The resistor is needed to decouple the IR receiver from the microcontroller during the firmware upload.
The procedure for learning device codes buttons next. Turn on the power while pressing the button on the input PB3 (then it can be released). The first load briefly turns on and then turns off. Press on the remote button, which we want to include the first load. As soon as the remote control sends the same code twice (this happens if you hold the button down for at least a couple of seconds), the first load will turn on for five seconds and turn off. And the second will turn on briefly and also immediately turn off. We teach the device the code of the second load button. Then the third. Now we consistently do the same with the codes of the buttons with which we wish to disconnect the loads. The program will write the codes in the EEPROM, now you need to turn off and turn on the power, but do not press the button on the PB3 input. The device will go into operating mode in which you can manage the loads.
When testing loads are LEDs connected through resistors. Making sure that everything works, we connect the keys controlling the relays to the outputs. As can be seen from the scheme of any of the three keys, the indicator LEDs with resistors are left in place for convenience:

In fact, there should be NPN transistors connected by common wire emitters, but the author works this way. For example, LED lamps with color temperatures of 2700, 4000 and 6400 K can serve as loads. You can switch them manually according to circadian rhythms, without relying on automation.
Assembly code:
without and
with HTML formatting .
Confirmation that it was possible to meet the 290 16-bit words:
gavrasm Gerd's AVR assembler version 3.5 (C)2015 by DG4FAC ---------------------------------------------------------- Source file: 12_IR-Rx_Switch.asm Hex file: 12_IR-Rx_Switch.hex Eeprom file: 12_IR-Rx_Switch.eep Compiled: 23.11.2016, 23:23:05 Pass: 2 1: ; 2: ; *************************************** 3: ; * IR-Switch 3-Channel with ATtiny13 * 4: ; * (C)2016 by www.avr-asm-tutorial.net * 5: ; *************************************** ... Program : 290 words. Constants : 0 words. Total program memory: 290 words. Eeprom space : 13 bytes. Data segment : 29 bytes. Compilation completed, no errors. Compilation ended 23.11.2016, 23:23:05