Can't get icons and background images to work

Hi,

I have set up my Home Assistant as an on top installation on Python 3.6. Everything works well except my HADashboard configuration. The dashboard works fine, except for icons and background image of my HADashboard. Neither fa nor mdi icons work. I have checked threads with similar problems. The CSS files are where they should be and the permissions are set correctly. use_hass_icon: 1 is not included in my dashboard.yaml-file.
The 2nd problem are background image of custom styles. They are simply not shown.
Is anybody familiar with a similar problem and can give me some hints on how to solve it?

I had a similar “issue”. It turned out that I had to restart appdaemon in order to get background pictures work after they were uploaded. Widgets are reloaded straight away after each dash modification, but images don’t :slight_smile:

please show a dashboard if you cant get it to work so we can figure out whats wrong.

you can do the following things to make sure there is no hidden problem:

  1. clear cash from the device where you start the dashboard.
  2. clear the directories conf/compiled/css conf/compiled/html and conf/compiled/javascript
  3. restart appdaemon
  4. try another browser (google chrome preferred) on another device

Thanks :slight_smile: . I tried all your suggestions. Now background images work fine. However, icons still don’t do it. I post a dashboard code. It is the fa-snowflake-o, which is never shown.

# Main arguments, all optional
#
title: Wohnung
widget_dimensions: [122, 120]
widget_margins: [5, 5]
columns: 8
global_parameters:
    use_hass_icon: 0
#
# Layout
#    
layout:
    - clock (2x2), weather (2x2), aussentemp (2x1), mintemp, maxtemp
    - geftemp (2x1), niederschlagmen, humidity
    - pflanze1, pflanze_temperature, pflanze_moisture, light_level(2x1), conductivity_level(2x1), battery_level
    - reload, aussen


pflanze1:
    widget_type: label
    title: Pflanze 1
   

clock:
    widget_type: clock
    time_format: 24hr
    widget_style: "background: white"
    date_style: "color: blue"
    time_style: "color: green"

weather:
    widget_type: weather
    title: Wetter 
    units: si

aussentemp:
    widget_type: sensor
    title: Temperatur auĂźen
    units: "°C"
    precision: 1
    entity: sensor.dark_sky_temperature

mintemp:
    widget_type: sensor
    title: Temperatur min.
    units: "°C"
    precision: 0
    entity: sensor.dark_sky_daily_low_temperature

maxtemp:
    widget_type: sensor
    title: Temperatur max.
    units: "°C"
    precision: 0
    entity: sensor.dark_sky_daily_high_temperature

geftemp:
    widget_type: sensor
    title: GefĂĽhlte Temperatur
    units: "°C"
    precision: 0
    entity: sensor.dark_sky_apparent_temperature

niederschlagmen:
    widget_type: sensor
    title: Niederschlag Menge
    units: "mm"
    precision: 0
    entity: sensor.dark_sky_precip_intensity


humidity:
    widget_type: gauge
    title: Luftfeuchtigkeit
    precision: 0
    units: "%"
    min: 10
    max: 100
    low_color: 4CFF00
    med_color: FFD800
    high_color: FF0000
    entity: sensor.dark_sky_humidity

pflanze_temperature:
    widget_type: sensor
    title: Temperatur innen
    units: "°C"
    precision: 1
    entity: sensor.pflanzewz_temperature
 
pflanze_moisture:
    widget_type: sensor
    title: Bodenfeuchte
    units: "%"
    precision: 0
    entity: sensor.pflanzewz_moisture


light_level:
    widget_type: sensor
    title: Lichtstärke
    units: "lux"
    precision: 0
    shorten: 1
    entity: sensor.pflanzewz_light_intensity

battery_level:
    widget_type: gauge
    title: Batterieladung
    units: "%"
    precision: 0
    shorten: 1
    min: 10
    max: 100
    low_color: FF0000
    med_color: FFD800
    high_color: 4CFF00
    entity: sensor.pflanzewz_battery
        
conductivity_level:
    widget_type: sensor
    title: Leitfähigkeit
    units: "µS/cm"
    precision: 0
    shorten: 1
    entity: sensor.pflanzewz_conductivity


aussen:
    widget_type: navigate
    title: Garten
    icon: fa-snowflake-o
    url: /garten.html


reload:
    widget_type: reload
title: Reload

navigate has icon_active and icon_inactive and not icon :wink:

Thank you very much :slight_smile: . I took the “icon” command out of this file:
https://github.com/home-assistant/appdaemon/blob/dev/conf/example_dashboards/Single%20File/Single.dash
Seems to be used wrong there.

its already noticed and Andrew will change that.

I have been beating my head against the wall on why my images weren’t working.

I had a question about step 2. is there a command to clear the directors, I can restart from the CLI but couldn’t find anything about that.

Much appreciated

step 2 is only possible if you dont use hassio.
how to clear them is just by deleting everything inside them.
that can be done with samba or any way you like. (dont ask me how its done on a commandline, google is more helpfull there, because i avoid commandline :wink: )

But the command line is so much fun, make me feel like I’m in the movie hackers just without all the latex and leather clothing.

My setup is a standard install running on a Freenas jail. So I’d just need to locate those files and delete them so they repopulate?

Thanks

i am way to old for it. i rather see what i am doing then learn command from my head :wink:

i dont know what you mean with standard install.
if you installed AD in a venv or with docker (so not hassio) you know where you did place your configuration on the HD.
and the files are then inside conf/compiled/css (html and js) directories.

the addon from hassio relocates the files somehow to a temp dir or hides them (at least i did get that from hassio users), so they are hard to find.

and indeed those files can be deleted and they will repopulate at the moment you call a dashboard.

Copy that I didn’t realize those were the the files you were referencing

Thanks for insight

Hello,

I do have the same strange issue. I have a dashboard running fine for several months.
I just added some new switches and can’t get them to have a working icon:

previous working entry :

guirlande:
    title: Guirlande
    widget_type: switch
    entity: switch.guirlande
    icon_on: mdi-lightbulb-on
    icon_off: mdi-lightbulb

new not working entry:

cube:
    title: Cube
    widget_type: switch
    entity: switch.sonoff_basic_relay_2
    icon_on: mdi-cube-outline
    icon_off: mdi-cube-outline

Strangest thing is replacing mdi-cube-outline with mdi-lightbulb-on will not work either.
I’m not sure how to handle this issue.

its possible that cube-outline is newer then the version that is downloaded in dashboard.
probably thats why it didnt work.

and then you replaced it and if it doesnt change, you got a cashe probem.

so delete all cashe on the device you show dashboard on and reload the dashboard.

to make sure that it will recompile you can use ?recompile=1 after your url so like
htttp://dashboardserver/dashboard?recompile=1
if you use a skin then dont use a second ? but a & so it would be
htttp://dashboardserver/dashboard?skin=skin&recompile=1

in fact I have the issue with other switch widgets (one using mdi-lava-lamp). I tried all the usual tricks before posting: different browsers, recompile, hard refresh, etc.

Only once, I was able to briefly see the icons during the first access on my phone. I see no error in logs, nothing that could give me a hint on what is going on.

in general to test if it works i advice to use google chrome on a PC.
on other devices its hard to completely clear your cashe.

i just tested and i can tell you for sure that cube-outline is not available in AD 3
lava-lamp on the other hand is working as usual.

so we have to figure out where your problems are.
but we need to do that step by step.

first i need to know on what platform you work (hassio, docker, venv)
then we need to add the acces log to appdaemon.yaml
and i need to be sure that AD is working as expected, so i need the full startup log after you restarted appdaemon.

it might be easier if we do that on discord if you like.

but we also can do it here.

1 Like

Rene was able to catch an old setting: use_hass_icon: 1 that was messing my dashboard.
Thank you very much.

1 Like