Can't use Sonoff Switches in Automation

I am using a PIR Motion sensor on ESP8266. The motion sensor is working fine. I can control the Sonoff switches from my dashboard.
I want to use a very simple automation; when motion is detected turn on a switch.
But in Automation I have tried everything & it doesn’t work. I tried using the blueprint as well as starting from scratch.
I tried adding Action as Device; but the switches don’t show up there.
I tried using Call service > Automation: Turn on > Entity; BTW under this nothings shows up, but I tried adding the Entity ID manually & the automation still doesn’t work.
FYI I am able to use my Sonoff switches using the HACS as I didn’t want to flash them with TASMOTA.

Try the switch.turn_on service. That should list your switches as available entities to control.

Thanks tom_j, it worked.