Lovelace front end - Group doesnt show as yellow when On

Hi,

I use lovelace and mainly Glance cards which show everything in a room. For my kitchen I have three lights controlled by Fibaro Z Wave switch modules.
As I cannot use a light group with the switch modules I created a normal group which toggles off and on the three Fibaro switches that control my lights.

When this group is on and shown as on in the glace card the icon does not turn yellow unlike everything else I have seen.

Is this is a bug or do I need to configure something differently?

Thanks in advance!!

Stuart

I’m not sure, it could be a bug. You should look at the state of the group in HA’s states page. If it doesn’t say ‘on’, then that would be the problem.

If you want to make a light group with switches, you can use template switch. It’s a little harder to setup but it will treat the switches as a group of switches.

group.kitchen_lights on entity_id: switch.fibaro_system_fgs223_double_relay_switch_11,switch.fibaro_system_fgs223_double_relay_switch_12,switch.fibaro_system_fgs223_double_relay_switch_9 order: 0 friendly_name: Kitchen Lights

Its defo on!

Can you share your configuration for the glance card?

Its not perfect yet but…

  - id: ea02c341229c4c43949ed561ca0a56be  # Automatically created id
    type: glance
    title: Kitchen
    entities:
      - entity: group.kitchen_lights
        name: Lights
        tap_action: toggle
        icon: mdi:lightbulb
      - entity: binary_sensor.kitchen_door_v2
        name: Door
      - entity: binary_sensor.kitchen_windows_v2
        name: Windows
      - entity: sensor.aeotec_zw100_multisensor_6_temperature_3
        name: Temperature
        icon: mdi:thermometer 
      - entity: binary_sensor.aeotec_zw100_multisensor_6_sensor_3
        name: Movement
        icon: mdi:walk
      - entity: sensor.kitchen_nest_protect_color_status
        name: Smoke/CO
        icon: mdi:smoke-detector
      - entity: media_player.kitchen_2
        name: Sonos One
      - entity: light.fibaro_system_fgd212_dimmer_2_level_2
        name: Stairs
        tap_action: toggle
      - entity: sensor.kitchen_temp
        name: Kitchen
        icon: mdi:thermometer
      - entity: sensor.fibaro_system_fgdw002_door_opening_sensor_2_temperature_17
        name: Toilet
        icon: mdi:thermometer
      - entity: binary_sensor.kitchen_toilet_v2
        name: Toilet

Whole thing looks good to me. You may have found a bug, or groups purposely don’t give a state. I’m not sure which one is the case.

Actually, this is by design. Group icons do not change based on the state. So what you could do is build a switch template:

switch:
  - platform: template
    switches
        kitchen:
          value_template: "{{ is_state('group.kitchen_lights','on') }}"
          turn_on:
            service: homeassistant.turn_on
            data:
              entity_id: group.kitchen_lights
          turn_off:
            service: homeassistant.turn_off
            data:
              entity_id: group.kitchen_lights
1 Like

Thanks for the assistance - it is much appreciated. I will go ahead and try that.

Cheers

Stuart

I tried this and it gives me an invalid switch template error.

probably has a typo, won’t really know without seeing what you tried.

Nevermind, figured out the issue. In the example code, colon is missing after switches.

Why this choice? Groups have a state :smiley:

There are a number of reasons to wrap a groups on/off functionality to a switch. They are all nitpick reasons though. Don’t bother with it unless you are very particular. I personally like to have all my lights and groups as switch entity_id’s. Also, as stated above, the icon for a group does not change (unless this was fixed in recent versions). So if you want an icon that reflects the on/off state or want an icon that changes, wrap it in a switch. I also originally set this up with emulated hue in mind. At the time, I don’t believe emulated hue handled groups.