Thanks for taking the trouble to reply, its in the screen that you get when you select LOGS from ESPhome UI, it then connects to the device.
The screen shows the output turning on & off as per screen shot. But I am trying to use the state of this output in a script and not sure how read the state.in a “If Statement”
I assume I have to use the id? as
switch.is_on: sonoff_pow_access_1
trying to use the HA names does not work
But not sure if that is just a label or does it also hold the state of the switch?