when i run the command in the terminal of HA it executes ok and sleeps the mac. definining it in the configuration and running it via serivces it does nothing… any ideas?
Can you share your config how you call this shell command then I can try it out and have a look.
I don’t use any shell commands so I don’t know where to find logs.
But I would look first in Configuration → System → Logs – HA Core or Supervisor.
But maybe they are in Configuration → Automations & Scenes → Automations/Scripts (what ever you use) → 3 dots menü → runs (or how ever it is translated) – and in there in the step executing the command.
-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