Hi all, been struggling for hours on this
I want to press keys from my HAOS (raspberry 5) to my mac.
- I’ve create the script Mac which works.
- I created the no auth connection on the rpi5 to the Mac, copied the private key, etc, it works too
- via HASS terminal, I can successfully run it runs as expected
ssh -o StrictHostKeyChecking=no user@targetIP "osascript /Users/path/key_press.scpt"
- I managed to create the command-line and entity in the Configuration.yaml:
command_line:
- switch:
name: Simulate Key
unique_id: switch.simulate_key
command_on: 'ssh -o StrictHostKeyChecking=no user@targetIP "osascript /Users/path/key_press.scpt"'
command_off: 'ssh -o StrictHostKeyChecking=no user@targetIP "osascript /Users/path/key_press.scpt"'
- I then move to creating a button on the dashboard but the button is unresponsive. It shows “off” but never turns on upon clicking it. Here’s its code:
type: button
show_name: true
show_icon: true
name: Simulate Key Press
tap_action:
action: perform-action
perform_action: switch.toggle
target:
entity_id: switch.simulate_key_press_3
data: {}
show_state: true
entity: switch.simulate_key_press_3
hold_action:
action: toggle
Can you help?