Automation has an action that calls an unknown service: light.turn_on

I upgraded from 2024.1.6 to 2024.2.1, and since then, I have several automations that are showing in the repair section.

They are all providing this error: " (automation.outdoor_lights_off_sunrise ) has an action that calls an unknown service: light.turn_off ."

I have gone in to attempt to edit, and when I attempt to edit the service, no option showing “light” is available in the drop down menu any longer.

I also have found that any of my entities that I have changed from switch to light, are now giving a variation of this error: “This entity is no longer being provided by the switch_as_x integration. If the entity is no longer in use, delete it in settings.”

I’m not sure if it’s related or not, but I also have several integrations showing a “Failed to set up” message, and I cannot get them to load.

This is the root cause of your issues. If the light integration is not loaded then it can not provide the light.tun_on / off services.

Look in Settings → System → Logs to find out why your light integration (and others) can not be loaded.