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 :
I do this but in a slightly different way. I go here Material Design Icons and click on the actual icon I want (not the code), it copies it to clipboard.
Then, I paste in the glyphs list, it looks like this:
Hii, I display wifi icon based on the wifi state like this, I created a template switch that checks for every 10s if wifi is connected. The state of the template switch is used to display whether the wifi is connected.
@VarunKumaran30 - Thank you for sharing your YAML. While it worked, I did not want to use or expose a switch to HA and figured I’d try using a variable instead to do the same thing. It appears to work… this is what I did:
Declaring the global variable:
#https://esphome.io/guides/automations.html?highlight=restore_value#bonus-2-global-variables
globals: ##to set default reboot behavior
- id: wifi_connection
type: bool
restore_value: no
initial_value: "false"
Speaking of fonts, I searched the icon font file on google, found the github, downloaded the file, and placed it in a new fonts folder with this path: \HASS_IP\config\esphome\fonts
Code to display the icon in the top right of the 64x128 screen:
[display:267] Encountered character without representation in font: '&'
01:00:24 [W] [display:267] Encountered character without representation in font: '�'
and this:
[01:35:15][W][display:267]: Encountered character without representation in font: '\xcc'
[01:35:15][W][display:267]: Encountered character without representation in font: '&'
[01:35:15][W][display:267]: Encountered character without representation in font: '\xfb'
[01:35:15][W][display:267]: Encountered character without representation in font: '?'
[01:35:15][W][display:267]: Encountered character without representation in font: ''
@Tofandel, I’d like to use your code with one of my ESP32 projects. Problem is, due to the way the code snippet displays in your post, I can’t tell what (mdi?) characters should be referenced.
Is it safe for me to assume the code should read something like this;
The "" symbol being replaced with the associated mdi: code.
Edit - I took a chance and added the above file (wifi_icon.h) and code to my configuration. I’m happy to report all is working well. Now all I need to do is figure out how to associate a colour with each WiFi strength. Then I could show green for Hi strength, yellow for Medium and red for Low for no connectivity.