diff --git a/README.md b/README.md index 0523f8a..8bfa446 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,13 @@ A custom DMX server that integrates with Home Assistant. ```sh pip install -r requirements.txt ``` +Create a `settings.ini` file with the following settings filled in: + +``` +[HomeAssistant] +url= +token= +``` + +url is the address of the Home Assistant instance with http or https. +token is the Long-Lived Access Token for Home Assistant. It can be obtained by going to the Home Assistant profile page and scrolling to the Long-Lived Access Tokens section and click Create Token. Give the token a name and click OK. Copy the token. diff --git a/aquadmx.py b/aquadmx.py index 6880660..450e348 100644 --- a/aquadmx.py +++ b/aquadmx.py @@ -22,7 +22,7 @@ config = configparser.ConfigParser() config.sections() programPath = os.path.dirname(os.path.realpath(__file__)) config.read('{}/settings.ini'.format(programPath)) -URL = 'https://{}/api'.format(config['HomeAssistant']['url']) +URL = '{}/api'.format(config['HomeAssistant']['url']) TOKEN = config['HomeAssistant']['token'] client = Client(URL, TOKEN) light = client.get_domain('light')