From 95a179ec3f0c07f643b6f0c7cdba11dff08e687d Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 10 Oct 2017 09:50:30 +0200 Subject: [PATCH] Move configurator to new API (#189) * Update config.json * Update map.py * Update config.json --- configurator/config.json | 7 ++----- configurator/map.py | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/configurator/config.json b/configurator/config.json index a6f8be5..e94a774 100644 --- a/configurator/config.json +++ b/configurator/config.json @@ -1,19 +1,18 @@ { "name": "Configurator", - "version": "0.2.0-p1", + "version": "0.2.0-p2", "slug": "configurator", "description": "Browser-based configuration file editor for Home Assistant.", "url": "https://home-assistant.io/addons/configurator", "startup": "application", "webui": "[PROTO:ssl]://[HOST]:[PORT:3218]", + "homeassistant_api": true, "boot": "auto", "ports": { "3218/tcp": 3218 }, "map": ["config:rw", "ssl"], "options": { - "homeassistant_api": "http://homeassistant:8123/api", - "homeassistant_password": "", "username": "admin", "password": null, "certfile": "fullchain.pem", @@ -24,8 +23,6 @@ "ignore_pattern": ["__pycache__"] }, "schema": { - "homeassistant_api": "url", - "homeassistant_password": "str", "username": "str", "password": "match(.+)", "certfile": "str", diff --git a/configurator/map.py b/configurator/map.py index eb22660..0441953 100644 --- a/configurator/map.py +++ b/configurator/map.py @@ -11,8 +11,8 @@ with hassio_options.open('r') as json_file: configurator = { 'BASEPATH': "/config", - 'HASS_API': options['homeassistant_api'], - 'HASS_API_PASSWORD': options['homeassistant_password'], + 'HASS_API': "http://hassio/homeassistant/api", + 'HASS_API_PASSWORD': "", 'CREDENTIALS': "{}:{}".format(options['username'], options['password']), 'SSL_CERTIFICATE':