It's me sitting at a desk, turning away from the two displays in the background to look at the camera. I'm wearing a white shirt. Dávid Bárdos
© 2025
gridranger
My Computer
Categories
Network neighborhood
Degoogling
Refactoring: Yeelight GUI
Gaming backlog
Clean patching
Company culture
KDE Neon
Blaugust - Summary
About Gridranger
Space Colony
Friendships in my life
Jousting in video games
Helsinki Biennial
Data & Encryption
Intro through traits
Hospital visit
Win 3.1 nostalgia
Poets of the Fall
Project done!
Video games that made me learn
Blaugust: Introduction
Blogger Takeout Viewer
Treasure of the Pirate King
Chimera Squad
About the icons
Family history
Random facts about me
Discovering the web-browser module
`partial` and `partialmethod`
Refactoring: Yeelight GUI

I'd like to contribute to open source projects, but I don't have enough time to do so regularly for any specific project nowadays. The best I can do is clean up some small abandoned code bases that I find useful.

And there's another thing. Lately, I've been thinking a lot about getting a phone that doesn't run Android at all but Ubuntu Touch instead. But this raises a few questions. One of them is how to control my smart bulb? A Python app that runs on any desktop Linux might do the trick. I looked for a UI for the yeelight Python library and I found this one: Ryszard-S/yeelight-GUI.

It looked unmaintained. I forked it (gridranger/yeelight-gui), cleaned up the code and fixed some minor issues. For example, the bulb list no longer forgets the selected bulb when a new scene is picked. Auto-detection is also improved. Additional button clicks after setting the color temperature and brightness are no longer necessary. Setting the values apply them automatically. Instead of failing silently when the config is missing or invalid, a default one is loaded. Cursor is animated while the app is looking for bulbs on the network. And so on.

Two versions of the same application. They feature the same functions like turning the lights on and off, changing color, color temperature, brightness or predefined scenes of the selected smartbulbs. The newer version is smaller as it has two less buttons and smaller font size. The color of the widgets are light and dark yellow (old gold and reef gold) while the background of the application is dark gray (mineshaft grey).

Most of the credit goes to Stavros Korokithakis who maintains the python-yeelight library that serves as the foundation of this app. Also to Ryszard-S who wrote the original code that I cleaned up.

I'll use it on my desktop for a couple of days to see if it's comfortable and, if not, what needs to be changed.

Further plans:

  • Create a Pip-installable package that allows you to launch the app by running a single binary.
  • Store the configuration file in the user's home folder (~/.local/share/yeelight-gui for Linux and somewhere under the AppData for Windows).

Any additional ideas and contributions are welcome.

📆 Posted:️ 2025-10-28
🏷️ Tags: Clean codePythonDegoogleLinux