Skip to content

Instantly share code, notes, and snippets.

@Slalamander
Slalamander / mdi_glyph_substitutions.yaml
Last active September 1, 2025 15:03
mdi icon substitutions for ESPHome
##Allows using mdi icons in esphome configs without having to look up the unicode value
##Uses the substitution engine to substitute the icon with the unicode. This means it is limited to a valid substitution format
##So instead of the home assistant mdi: way, icons are prefixed with mdi_. Slashes are also not allowed, so those are replaced with underscores as well.
mdi_ab_testing: "\U000F01C9"
mdi_abacus: "\U000F16E0"
mdi_abjad_arabic: "\U000F1328"
mdi_abjad_hebrew: "\U000F1329"
mdi_abugida_devanagari: "\U000F132A"
mdi_abugida_thai: "\U000F132B"
@Slalamander
Slalamander / tradfri_led1945c5_intercept.yaml
Created January 19, 2025 10:15
Ikea Tradfri LED1949C5 Patcher
blueprint:
name: Tradfri LED1949C5 Patcher
description: |
The IKEA tradfri LED1949C5 bulbs seem to have a bug in the firmware where instructing them to turn off with a transition when they are already off, causes them to turn on.
The light still reports being off to Home Assistant, however. From testing, this only seemed to happen if the previous command turned the light off from being on.
Calling turn off again when it is in this spooky state (credits to 123 for that term) turns it off and seems to prevent it from happening again.
This blueprint aims to fix the light turning on in the spooky state by catching turn off commands if it is already off.
It listens to all calls to the ``light.turn_off`` service, then checks for the conditions that:
- The light is currently off
- The turn off is called with a transition