Don’t use device actions. Use a service like light.turn_on.
light.turn_on
There are other reasons for avoiding device automations too: