diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..dad0ad9 Binary files /dev/null and b/.DS_Store differ diff --git a/.devcontainer.json b/.devcontainer.json deleted file mode 100644 index b818177..0000000 --- a/.devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Example Home Assistant add-on repository", - "image": "ghcr.io/home-assistant/devcontainer:addons", - "appPort": ["7123:8123", "7357:4357"], - "postStartCommand": "bash devcontainer_bootstrap", - "runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"], - "remoteUser":"root", - "containerEnv": { - "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}" - }, - "extensions": ["timonwong.shellcheck", "esbenp.prettier-vscode"], - "mounts": ["type=volume,target=/var/lib/docker"], - "settings": { - "terminal.integrated.profiles.linux": { - "zsh": { - "path": "/usr/bin/zsh" - } - }, - "terminal.integrated.defaultProfile.linux": "zsh", - "editor.formatOnPaste": false, - "editor.formatOnSave": true, - "editor.formatOnType": true, - "files.trimTrailingWhitespace": true - } -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index cb4e05c..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "Start Home Assistant", - "type": "shell", - "command": "supervisor_run", - "group": { - "kind": "test", - "isDefault": true - }, - "presentation": { - "reveal": "always", - "panel": "new" - }, - "problemMatcher": [] - } - ] -} diff --git a/hello_world/DOCS.md b/hello_world/DOCS.md new file mode 100644 index 0000000..b8432c3 --- /dev/null +++ b/hello_world/DOCS.md @@ -0,0 +1,10 @@ +# Home Assistant Add-on: Example add-on + +## How to use + +This add-on really does nothing. It is just an example. + +When started it will print the configured message or "Hello world" in the log. + +It will also print "All done!" in `/share/example_addon_output.txt` to show +simple example of the usage of `map` in addon config. diff --git a/hello_world/Dockerfile b/hello_world/Dockerfile new file mode 100644 index 0000000..d8ba574 --- /dev/null +++ b/hello_world/Dockerfile @@ -0,0 +1,8 @@ +ARG BUILD_FROM +FROM $BUILD_FROM + +# Copy data for add-on +COPY run.sh / +RUN chmod a+x /run.sh + +CMD [ "/run.sh" ] \ No newline at end of file diff --git a/hello_world/README.md b/hello_world/README.md new file mode 100644 index 0000000..a0de77f --- /dev/null +++ b/hello_world/README.md @@ -0,0 +1,15 @@ +# Home Assistant Add-on: Example add-on + +_Example add-on to use as a blueprint for new add-ons._ + +![Supports aarch64 Architecture][aarch64-shield] +![Supports amd64 Architecture][amd64-shield] +![Supports armhf Architecture][armhf-shield] +![Supports armv7 Architecture][armv7-shield] +![Supports i386 Architecture][i386-shield] + +[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg +[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg +[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg +[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg diff --git a/hello_world/build.yaml b/hello_world/build.yaml new file mode 100644 index 0000000..fafd99b --- /dev/null +++ b/hello_world/build.yaml @@ -0,0 +1,12 @@ +# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile +build_from: + aarch64: "aschmere/hello_world:latest" + amd64: "aschmere/hello_world:latest" + armhf: "aschmere/hello_world:latest" + armv7: "aschmere/hello_world:latest" + i386: "aschmere/hello_world:latest" +labels: + org.opencontainers.image.title: "Home Assistant Add-on: Hello World." + org.opencontainers.image.description: "Hello World" +args: + TEMPIO_VERSION: "2021.09.0" diff --git a/hello_world/config.yaml b/hello_world/config.yaml new file mode 100644 index 0000000..c6a3506 --- /dev/null +++ b/hello_world/config.yaml @@ -0,0 +1,22 @@ +name: Hello World +version: 1.1.0 +slug: hello_world +description: My first Home Assistant add-on. +arch: + - armhf + - armv7 + - aarch64 + - amd64 + - i386 +startup: application +boot: auto +ports: + 8000/tcp: 8000 +options: + greeting: "Hello, Home Assistant!" +schema: + greeting: + type: string + default: "Hello, Home Assistant!" +image: aschmere/hello_world:{arch}-1.1.0 + diff --git a/hello_world/run.sh b/hello_world/run.sh new file mode 100644 index 0000000..9d0942c --- /dev/null +++ b/hello_world/run.sh @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +echo "Hello world!" + +python3 -m http.server 8000 \ No newline at end of file diff --git a/repository.yaml b/repository.yaml index e92d4da..9a02688 100644 --- a/repository.yaml +++ b/repository.yaml @@ -1,4 +1,4 @@ # https://developers.home-assistant.io/docs/add-ons/repository#repository-configuration -name: Example Home Assistant add-on repository -url: 'https://github.com/home-assistant/addons-example' -maintainer: Awesome Maintainer \ No newline at end of file +name: Arnos Home Assistant Add-On Test Repository +url: 'https://github.com/aschmere/hass_addon_test' +maintainer: Test \ No newline at end of file