Yes, excellent that was it.
It wasn’t easy to fix and I think the reason I struggled with this is the Automations GUI editor is pretty unforgiving of editing in a way that it’s not expecting. It kept modifying what I was typing and where I was typing it.
eg, in the Automation Action I had this:
service: 'switch.turn_{{ trigger.to_state.state }}'
entity_id: switch.arlecpb4_loungepbceil_socket1
if you insert your cursor before the “s” in ‘switch’ of line two, to insert a new line and a dash, the “enter” key and first two spaces work, however as soon as you type the -
it removes those spaces and newline and inserts quotes around it, resulting in:
service: 'switch.turn_{{ trigger.to_state.state }}'
entity_id: '-switch.arlecpb4_loungepbceil_socket1'
which is obviously wrong.
Having a dash on the line and backspacing over an existing entry always added the word null
. Back spacing over null
resuled in 'n'
… arrrrgh! 
It was a pain to edit, but copying the existing YAML to an external editor and pasting it in, worked.
I also found that leaving something on the first line (in this case 'n'
) and inserting the required entities below this, I could then go back and remove the ancillary text. convoluted, but it worked.
This happened in Chrome on linux and Safari in OSX (I thought it may have been browser specific, but I don’t think so)
Anyway. as @Burningstone put above, worked perfectly.
Thanks to all! Cheers
edit: just thought I would include the full example, even though it is listed above
service: 'switch.turn_{{ trigger.to_state.state }}'
entity_id:
- switch.arlecpb4_loungepbceil_socket1
- switch.arlecpb4_loungepbceil_socket3
- switch.arlecpb4_loungepbceil_socket4
edit: should I report this editing thing as a bug? Being that it’s something outside of how the GUI editor is expecting, I feel that it’s not really relevant. I could make a video demo-ing the problem if need be