The channel name isn’t required[1]. If not set then it is considered global, and will run the dialplan function without a channel. The implementation of DEVICE_STATE itself also does not require a channel.
If you don’t specify a channel, is it not working?
Just checked again and to my chagrin, it is working with no channel … I did test that but must have had a bug as I was getting a “channel not found” response.
Thanks for taking the time to reply on a Saturday morning, it’s much appreciated, sorry to bother