Hi,
I’m trying to display an icon based on wifi.connected.
interval:
- interval: 10s
then:
if:
condition:
wifi.connected:
then:
- lambda: 'id(affichage).printf(20, 20, id(icons), id(my_red), "\U000F05A9");'
else:
- lambda: 'id(affichage).printf(20, 20, id(icons), id(my_red), "\U000F05AA");'
I don’t get any errors on the log, the code complies properly, but the icon doesn’t show up. This is my display component, on which lambda is working properly :
display:
- platform: ili9341
id: affichage
model: TFT 2.4
rotation: 180
cs_pin: 5
dc_pin: 4
led_pin: 15
reset_pin: 22
lambda: |-
...
And icons :
- file: 'materialdesignicons-webfont.ttf'
id: icons
size: 36
glyphs:
- "\U000F05A9" #mdi:wifi
- "\U000F05AA" #mdi:wifi-off
- "\U000F0769" #mdi:ceiling-light
- "\U000F17C7" #mdi:ceiling-light-outline
- "\U000F06B5" #mdi:lamp
- "\U000F17D0" #mdi:lamp-outline
- "\U000F0CCC" #mdi:shield-lock-outline
- "\U000F099C" #mdi:shield-off-outline
- "\U000F0CCB" #mdi:shield-home-outline
- "\U000F1829" #mdi:shield-moon-outline
Any ideas?
Thanks