Light groups don't work after upgrading to 2021.3.1

Home Assistant is installed on VirtualBox.

Some of my zwave light switches show up as switches and my dimmers show up as lights. In my configuration.yaml I have the switches converted over to lights so I can then create light groups. The light groups have been working great for the last month. I was using core version 2021.2.3. I upgraded to 2021.3.1 and now the light groups do not work. It’s like HA is not recognizing the “light” section in my configuration.yaml. As an example, one of my switches is switch.kitchen. In the “light” section in my configuration.yaml I have it set to light.kitchen. I have a lovelace button card configured for the light.kitchen switch. If I press the button, nothing happens. The light does nothing but if I change the entity to switch.kitchen, it works. The light turns on/off.


my configuration.yaml

homeassistant:
  packages: !include_dir_named packages
  
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:


frontend:
  themes: !include_dir_merge_named themes
  
# DuckDNS
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  
# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

light:
### Convert switches to lights ###
  - platform: switch
    name: Living Room Front
    entity_id: switch.living_room_front
    
  - platform: switch
    name: Living Room Back
    entity_id: switch.living_room_back
    
  - platform: switch
    name: Kitchen
    entity_id: switch.kitchen
    
  - platform: switch
    name: Downstairs Hallway
    entity_id: switch.downstairs_hallway
    
  - platform: switch
    name: Upstairs Hallway
    entity_id: switch.upstairs_hallway
    
    
    
### Groups ### 
 
  - platform: group
    name: Living Room Lights
    entities:
      - light.living_room_front
      - light.living_room_back

  - platform: group
    name: Sundown Lights
    entities:
      - light.living_room_front
      - light.living_room_back
      - light.kitchen
      - light.downstairs_hallway
      - light.upstairs_hallway
  
  - platform: group
    name: All Lights
    entities:
      - light.living_room_front
      - light.living_room_back
      - light.kitchen
      - light.downstairs_hallway
      - light.upstairs_hallway
      - light.jaspers_light
      - light.logans_light
      - light.master_bedroom_light
  
  - platform: group
    name: Upstairs Lights
    entities:
      - light.upstairs_hallway
      - light.jaspers_light
      - light.master_bedroom_light
      - light.logans_light


I also have this error message in my logs.

Logger: homeassistant.helpers.service
Source: helpers/service.py:115
First occurred: 11:04:20 AM (6 occurrences)
Last logged: 11:05:12 AM

Unable to find referenced entities light.downstairs_hallway
Unable to find referenced entities light.living_room_back


I loaded a previous snapshot and the light groups worked. I reinstalled 2021.3.1 and the light groups did work for a little while. Before I knew there was still an issue, I updated the Supervisor to 2021.03.4. When I found out the issue was still there, I loaded the snapshot again but then all of my integrations were disabled. I found out the Supervisor was still at the newest version 2021.03.4. I had to reinstall 2021.3.1 to fix the disabled integrations. So, I am stuck on the newest version of core and my light groups do not work.

Preferably, I would like to get the light groups to work but if not, downgrading the Supervisor is also an option. Any help is greatly appreciated.

I saw the same thing this morning. In the Developer Tools, I looked for all the lights that had a status of “unavailable”. I then removed them one by one. Then I restarted HA Core. After that my lights came back, but had a _3 on the end of the entity name. I renamed them in Developer Tools (hit the [I] button and then the gear) and now everything is working fine.

1 Like

Thank you! That was exactly the problem. I removed the unavailable and then removed the _2 from the remaining lights and everything works!