This guide is for people with HA and macbooks with BetterTouchTool installed.
You can use your iphone or Apple Watch to control your MacBook in any other way want. Mine’s set up for basic media controls including PlayPause, Volume up/down, and having Spotify start playing either of my 2 most used playlists.
Settings > Web Server > Enable BetterTouchTool Web Server.
Choose which port you want to use. This is the BTT documention for using the web server
Create a named trigger and assign an action.
eg. name: MacPlayPause with Assigned Action: PlayPause.
In HA configuration.yaml:
shell_command: macbook_playpause: 'curl http://192.168.1.##:PORT/trigger_named/?trigger_name=MacPlayPause'
Just make sure the trigger_name matches exactly with your named trigger.
- alias: action_ios_macbook_playpause trigger: - platform: event event_type: ios.action_fired event_data: actionName: 'Mac PlayPause' action: - service: shell_command.macbook_playpause
Finally, in the ios Companion app > App configuration > Integrations > Actions
Create a new action with the name identical to your automation actionName. Set the text, icon & colours. Save it, exit, and you’re done.