Ahhh im blind, you need to add -o
:
shell_command:
imac_standby: ssh -o StrictHostKeyChecking=no -v -i /config/ssh/mac [email protected] "/Users/andreas/sleep"
As per ssh man page:
-o option
Can be used to give options in the format used in the configura‐
tion file. This is useful for specifying options for which there
is no separate command-line flag. For full details of the op‐
tions listed below, and their possible values, see ssh_config(5).
Or as debug log states:
home-assistant.log.1:b'Warning: Identity file /config/ssh/mac not accessible: No such file or directory.\nOpenSSH_9.0p1, OpenSSL 1.1.1s 1 Nov 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\nssh: Could not resolve hostname stricthostkeychecking=no: Name does not resolve\r\n'
Could not resolve hostname stricthostkeychecking=no: Name does not resolve
→ Bad 
FYI: Debug logging can be activated like this:
logger:
default: info
logs:
homeassistant.components: debug