diff --git a/Dockerfile b/Dockerfile index ae0c21c..acf81e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,4 +41,4 @@ ENV HASSIO_TOKEN "" EXPOSE 8000 -CMD [ "/data/venv/bin/python", "-m", "uvicorn", "src.app:app" ] +CMD [ "/data/venv/bin/python", "-m", "uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "8000" ] diff --git a/config.json b/config.json index 6d72b45..533dee4 100644 --- a/config.json +++ b/config.json @@ -3,9 +3,19 @@ "version": "0.0.0", "slug": "shortumation", "description": "A homeassitant addon which provides better UI for the automation.", - "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], + "arch": [ + "armhf", + "armv7", + "aarch64", + "amd64", + "i386" + ], "startup": "before", "boot": "auto", + "webui": "http://[HOST]:[PORT:8000]/web", + "map": [ + "config:rw" + ], "options": {}, "schema": { "8000/tcp": 8000 diff --git a/sample_config/automations.yaml b/sample_config/automations.yaml index 7939ba3..17484f5 100644 --- a/sample_config/automations.yaml +++ b/sample_config/automations.yaml @@ -1,27 +1,46 @@ -- id: "1616887975473" +- id: '1616887975473' alias: Home Assistant Off - description: "" - trigger: - - platform: homeassistant - event: shutdown - condition: [] - action: - - device_id: 2a98db84af7526c7ec3cc7aebd1a9e1c - domain: mobile_app - type: notify - title: Hassio Status - message: Hassio Is turning off... + description: '' + trigger_variables: mode: single -- id: "1616888026264" - alias: Home Assistant On - description: "" trigger: - - platform: homeassistant - event: start + - platform: homeassistant + event: shutdown condition: [] action: - - device_id: 2a98db84af7526c7ec3cc7aebd1a9e1c - domain: mobile_app - type: notify - title: Hassio Status - message: Home assistant is up! + - device_id: 2a98db84af7526c7ec3cc7aebd1a9e1c + domain: mobile_app + type: notify + title: Hassio Status + message: Hassio Is turning off... + - choose: [] + default: [] + alias: choose better days +- id: '1616888026264' + alias: Home Assistant On + description: '' + trigger: + - platform: homeassistant + event: start + condition: [] + action: + - device_id: 2a98db84af7526c7ec3cc7aebd1a9e1c + domain: mobile_app + type: notify + title: Hassio Status + message: Home assistant is up! +- id: shortu-2 + alias: Neat trick + description: '' + trigger_variables: + mode: queued + trigger: [] + condition: [] + action: + - alias: Choose + default: [] + choose: [] + - service: lights.turn_on + target: + entity: bear + data: {} diff --git a/sample_config/configuration.yaml b/sample_config/configuration.yaml new file mode 100644 index 0000000..2707225 --- /dev/null +++ b/sample_config/configuration.yaml @@ -0,0 +1,2 @@ +# empty configuration file +cloud: