- Create in the Windows Credential Manager, a
generic credential
with:Internet or network address
=HomeAssistant
;User name
= <your server url>; (examplehttps://hass.some.url/
)Password
= <Long-Lived Access Tokens> - Compile the script
HomeAssistantToggle.ahk
to exe
Call HomeAssistantToggle.exe
with:
- The switch name as it is in HomeAssistant.
- A human-readable title.
ex:
HomeAssistantToggle.exe "switch.office", "Office"
From Razer Synapse, you can't run
.exe
files with parameters. You will then need to create many.exe
for each switch.
You can create a new .ahk
script file in a folder named specifics
.
This is the template:
#Requires AutoHotkey v2.0
#SingleInstance Force
#Include "../Lib/HomeAssistantSwitchToggle.ahk"
HomeAssistantSwitchToggle("switch.office", "Office")