AppDaemon / appdaemon

:page_facing_up: Python Apps for Home Automation
Other
844 stars 418 forks source link

Mdi icons don't show for light groups on dashboards #1081

Closed CheeseySandal closed 1 year ago

CheeseySandal commented 3 years ago

I can't get the mdi icons to show up on my dashboard after I created light groups within Home Assistant. Clicking the widget works and I can controls the light no problem. Am I doing anything wrong? Have tried refreshing/deleting browser cache/different devices etc.

Thank you.

livingroom_light:
    widget_type: light
    entity: light.living_room
    title: "Living Room"
    icon_on: mdi-lightbulb-group
    icon_off: mdi-lightbulb-group-outline
    icon_style_active: "color: #83f442"
    on_attributes:
      brightness: 200

kitchen_spots:
    widget_type: light
    entity: light.kitchen_spots
    title: "Kitchen Spots"
#    icon_on: mdi-spotlight-beamn
#    icon_off: mdi-spotlight-beam
#    use_hass_icon: 1
    icon_style_active: "color: #83f442"
    on_attributes:
      brightness: 200

Dashboard

Screenshot 2020-12-03 at 20 18 45

Home Assistant config

light: !include includes/lights.yaml

includes/lights.yaml

- platform: group
  name: Kitchen_spots
  entities:
    - light.kitchenspot_1
    - light.kitchenspot_2
    - light.kitchenspot_3
    - light.kitchenspot_4
    - light.kitchenspot_5
    - light.kitchenspot_6
    - light.kitchenspot_7
    - light.kitchenspot_8
    - light.kitchenspot_9
    - light.kitchenspot_10

- platform: group
  name: Living Room
  entities:
    - light.living_room_front
    - light.living_room_back
    - light.tv_back_light
    - light.hue_play_left
    - light.hue_play_right
ReneTode commented 3 years ago

appdaemon isnt up to date with MDI, so its always possible that you find icons on the mdi site that dont work.

because the widget does work and the only problem is the those icons (others are working as you show) i suspect that those icons are not supported yet.

deadly667 commented 3 years ago

Maybe it is due to not supported icons but I have the same problem. My light groups has the same icon like other which works. Also, everything was working (event that light group icons) since last 3-4 months. As Appdaemon didnt update in that period and in logs I didnt see any errors I dont know whats the problem.

My environment is docker and I even tried delete image and pull the same again. No luck.

Group light tile works but there is no icon.

ReneTode commented 3 years ago

do you use the entity name in the layout, or did you specify specific widget settings?

and do you have use_hass_icons active or not?

what widgettype do you use?

deadly667 commented 3 years ago

appdaemon

title: Main Panel
widget_dimensions: [114, 114]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 8
global_parameters:
    use_comma: 0
    precision: 1
    use_hass_icon: 1

storage_light:
    widget_type: light
    title: Storage Light
    entity: light.storage_light_ikea_light
    icon_on: fa-lightbulb
    icon_off: fa-lightbulb

all_lights:
    widget_type: light
    title: All Lights
    entity: light.all_lights
    icon_on: fa-lightbulb
    icon_off: fa-lightbulb

layout:
    - clock (2x2), sensor.outdoor_temperature, lr_temp, thermostat, person.dora
    - sensor.outdoor_humidity, lr_hum, air_conditioner_switch, person.matija
    - lr_bulb_stripe_light, lr_bulb_3_light, lr_bulb_1_light, lr_greek_light, matija_pc_light, storage_light, all_lights
    - br_light, hall_light, sh_light, dr_light, cooking_sink_light, bar_light
    - include: bottom_panel_main

you can see that I use use_hass_icon. I deleted all other entities from this code snippet just to be easier to read but I have them all defined like storage_light. Cooking light is also group of lights and as you can see they have the same problem like All Lights and they are defined in same way like All Lights.

They have the same icon and you can see that in Storage Light entity it is shown correctly but in All Lights its missing. This setup was working great for 5 month I think correctly (group icon was also present) till October I think.

Changing use_hass_icon from 1 to 0 didnt help.

ReneTode commented 3 years ago

delete use_hass_icon after that make sure all cache is deleted, and the dashboard is recompiled (if neccesary restart AD)

the use_hass_icon option is interfering with the widget settings. its an option that tells your dashboard NOT to use icons from AD but from HA, but it never was bugfree because of changes in HA shortly after the option was added.

deadly667 commented 3 years ago

@ReneTode you are genius. Thats it! I already changed All Lights icon so dont be confused. Deleting use_hass_icon was the trick! I tried everything and I didn't think that this option will be problem. Tricky part for me was that it was working for some time and apparently they changed something in HA which then broke my setup.

image

deadly667 commented 3 years ago

@CheeseySandal check your dashboard yaml maybe you have the same problem like I had. Check if you have that use_hass_icon option set in global_parameters. If you do than delete it completely.