LEGO Remote Controlled Ambient Lighting
While working for the genetic sequencing company across the Atlantic, I got nudged into the world of LEGO, so now I know some of the lingo like alt-bricks, MOCs and whatnots. We had a workshop once for a team building and it was great. It got me to rethink all the bricks and what one can do with them.
Some time ago, one friend gifted us LEGO Bonsai model. I liked how it came with two style choices. You could do the standard green leaf tree and you could have it blossom in pinkish colors for the spring. They reused frogs as a flower bud element in pink color. It is a great hack. They also provided some inspiration in the manual should one wish to go into the MOC territory. There are some amazing trees out there. I especially love the Bonsai tree by Marius Herrmann since the bark is wonderfully executed. Maybe one day I dare to do something like that if we ever get to have more bricks in our apartment.
Soon afterwards, I had the standard Bonsai on our shelf. One of our cats, Tenzin, managed to climb the shelf and knock it over. It warned us that no models should be in the reach of them, but that said, they won't do things deliberately or clumsily. They are always curious and will accidentally knock over things trying to squeeze into small spaces, which was the case here. One of the bricks got severely dented when the structure underwent rapid unscheduled disassembly on the resin floor below. We were unlucky. I had to replace it with the same one and LEGO can provide replacement bricks for that purpose. Not so cheap, but possible.
When moving into another apartment we took our models with us, but this time we'd be smarter. We bought some Billy units from IKEA and put glass doors onto them. One of the bookcases is now serving as a bar shelf because I like making cocktails. There are various kits, bottles, glasses, utensils... might even put in a book or two on cocktail making. It's a display case after all and having that Bonsai in was perfect. No cats to mess it up and it looks cute. Most of our apartment is green, so the green leafy style was assembled for it.
Some time before we got our LEGO models placed in their designated nooks, Vesna told me that there's this thing in the LEGO world where people augment their sets with LED powered bricks to get some fancy lighting on them. It looked awesome based on the pictures we saw, so we put a kit for the Bonsai in the wishlist and some weeks later, bought the kit for the leafy green style. It stayed in the box waiting for us to move and for me to find time to wire it up, but I managed to do it. Not perfectly. There are wires, but it adds to the charm. It can definitely be more tightly wrapped if one wants to hide the wires completely.
The set is powered by 3 AA batteries and it has a manual switch. The kit is connected to the power unit by USB A. I had it wired up like that for some time. It looks amazing for the nightly ambient lighting, but I was lazy to get up each time and turn it on. Since I have a universal remote that can power the devices on and off, I was thinking there had to be a way to have it work remotely as well. Sure enough, a bit of looking up online revealed that there's an RF remote switch that starts at 3.6V from QIACHIP. Which is roughly 3 AA batteries that are rechargable (1.2 are those, but the standard ones are 1.5, times three, of course). It would be enough. I got the RF kit off of Amazon and also opted for USB Type A sockets to make life easier for me. No soldering. Just wiring up and using a small screwdriver to secure the wires in place.
The components arrived and I managed to wire them up according to the layout diagrams. I powered the system up, it lit up. I used the provided RF remote to make the buttons work the way I wanted and it was also working as expected. I didn't have issues with the instructions or the components themselves. The whole process was a breeze.
Soon afterwards I learned that the 3 AA batteries won't really pay off in the long run because I'd have to charge them more often than I'd like. My thought process went something like this: 4.5V... The smartphones are usually powered by 5V which is close enough. Would a powerbank work? It's able to connect to the USB after all. I had one lying around and sure enough, when I attached it, it had no problems powering the kit.

The story doesn't end here. The universal remote we have is a Broadlink RM4 Pro unit which means it connects to the WiFi. Sure enough, you can use the remote standalone and learn the command that way, which I did, but I seldom use it directly from the Broadlink app in my smartphone.
I have the remote integration enabled in our Home Assistant instance. So to continue the process, I used the developer tools to learn the command with learn_command:
action: remote.learn_command target: entity_id: - remote.broadlink_rm4_pro data: command_type: rf command: power device: bonsai
And with it, I have the send_command ready. I exposed it in the script called Toggle Bonsai.
action: remote.send_command data: command: power device: bonsai target: entity_id: remote.broadlink_rm4_pro
If the kit is on, it will turn it off and if it's off, it'll turn it on. Nothing special.
Then I made a helper Template of a type Switch.

But it wouldn't display nicely in the interface. So I made it a type of Light and it worked beautifully.

Because it can be exposed to a voice assistant, I did exactly that.
Now that all the great things are showcased, I can say what doesn't work. I can't know the state of the device unless I have some other external sensor. I have to manually sync the state if it ever gets out of sync, but I don't see that happening that often. I also don't need to preserve the state between restarts so it's also OK. As long as the instance is alive. I'm golden. More than often it's on powerbank dying but it's not a big annoyance as getting up and flipping the switch manually.