primo caricamento
This commit is contained in:
commit
d30984adfe
15 changed files with 658 additions and 0 deletions
5
docs/modello/CHANGELOG.md
Normal file
5
docs/modello/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Modifiche
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Prima versione.
|
||||
10
docs/modello/Dockerfile
Normal file
10
docs/modello/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
ARG BUILD_FROM
|
||||
FROM $BUILD_FROM
|
||||
|
||||
RUN apk add --no-cache python3
|
||||
|
||||
COPY programma.py /programma.py
|
||||
COPY run.sh /run.sh
|
||||
RUN chmod a+x /run.sh
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
7
docs/modello/README.md
Normal file
7
docs/modello/README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Modello di add-on
|
||||
|
||||
Copiare questa cartella alla radice del repository, rinominarla, scegliere uno
|
||||
`slug` univoco e riempire `config.yaml`.
|
||||
|
||||
Promemoria: niente valori di un singolo cliente nel codice, tutto in `options`
|
||||
con il relativo `schema`, e ogni modifica successiva alza `version`.
|
||||
3
docs/modello/build.yaml
Normal file
3
docs/modello/build.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
build_from:
|
||||
aarch64: ghcr.io/home-assistant/aarch64-base:latest
|
||||
amd64: ghcr.io/home-assistant/amd64-base:latest
|
||||
20
docs/modello/config.yaml
Normal file
20
docs/modello/config.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
name: Nome dell'add-on
|
||||
version: "1.0.0"
|
||||
slug: slug_univoco
|
||||
description: Una riga su cosa fa
|
||||
url: https://domotica.work
|
||||
arch:
|
||||
- aarch64
|
||||
- amd64
|
||||
init: false
|
||||
startup: services
|
||||
boot: auto
|
||||
# watchdog: "tcp://[HOST]:[PORT:0000]" # se l'add-on ascolta su una porta
|
||||
# ports:
|
||||
# 0000/tcp: 0000
|
||||
# ports_description:
|
||||
# 0000/tcp: A cosa serve questa porta
|
||||
options:
|
||||
esempio: valore
|
||||
schema:
|
||||
esempio: str
|
||||
8
docs/modello/run.sh
Normal file
8
docs/modello/run.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/with-contenv bashio
|
||||
# Legge le opzioni impostate dall'interfaccia dell'add-on e avvia il programma.
|
||||
|
||||
ESEMPIO=$(bashio::config 'esempio')
|
||||
|
||||
bashio::log.info "Avvio con esempio=${ESEMPIO}"
|
||||
|
||||
exec python3 /programma.py --esempio "${ESEMPIO}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue