Skip to content

works on my machine

¯\_(ツ)_/¯

  • Projects
  • Prototypes
  • Coding
  • HowTos
  • Pinouts
  • Story time

Links

Github
  • About
works on my machine
¯\_(ツ)_/¯

Dictionary

  • I am a bit wiser or – how to combine dictionaries and see what changed
    Coding

    I am a bit wiser or – how to combine dictionaries and see what changed

    ByStefan December 9, 2024

    I currently had the problem of handling updates with partial settings of RGB lights through MQTT and HomeAssistant. As The setting has to be complete at all times in the running system, so my first solution were multiple if else clauses and changed flags. It works, but it is ugly and over-complicated. I didn’t use…

    Read More I am a bit wiser or – how to combine dictionaries and see what changedContinue

  • Is it a bird? Is it a plane? Nah – just a Python class behaving like a dictionary.
    Coding | HowTos

    Is it a bird? Is it a plane? Nah – just a Python class behaving like a dictionary.

    ByStefan April 9, 2024April 10, 2024

    For a container class with a dictionary with config values (among other members) I wanted easy reading access as if it was a dict itself. For that you only have to implement the __getitem__ method. You can extend the provided dict functionality for your class if needed like the following: All but the update method…

    Read More Is it a bird? Is it a plane? Nah – just a Python class behaving like a dictionary.Continue

© 2025 works on my machine

Privacy Policy

Scroll to top
  • Projects
  • Prototypes
  • Coding
  • HowTos
  • Pinouts
  • Story time
Search