1
0

Compare commits

...

36 Commits

15 changed files with 141 additions and 51 deletions

75
.github/workflows/bump-version.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: Publish Release
on:
workflow_dispatch:
inputs:
version:
description: The version to release
required: true
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install -r script/requirements.txt
- run: script/bump-version.py ${{ github.event.inputs.version }}
- name: Commit version bump
id: commit_version
run: |
git config user.name esphomebot
git config user.email contact@esphome.io
git add .
git commit -m "Bump version to v${{ github.event.inputs.version }}"
git push
COMMIT=$(git rev-parse HEAD)
echo "::set-output name=commit_sha::${COMMIT}"
- if: ${{ contains(github.event.inputs.version, 'b') }}
name: Create Beta Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: 'See https://beta.esphome.io/changelog/index.html'
prerelease: true
commitish: ${{ steps.commit_version.outputs.commit_sha }}
- if: ${{ !contains(github.event.inputs.version, 'b') }}
name: Create Stable Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: 'See https://esphome.io/changelog/index.html'
prerelease: false
commitish: ${{ steps.commit_version.outputs.commit_sha }}
deploy-community-addons:
runs-on: ubuntu-latest
needs: [create-release]
steps:
- if: ${{ contains(github.event.inputs.version, 'b') }}
name: Publish beta release to community-addons repository
run: |
docker run --rm hassioaddons/repository-updater:latest \
--repository hassio-addons/repository-beta \
--addon esphome \
--token "${TOKEN}"
env:
TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }}
- if: ${{ !contains(github.event.inputs.version, 'b') }}
name: Publish stable release to community-addons repository
run: |
docker run --rm hassioaddons/repository-updater:latest \
--repository hassio-addons/repository \
--addon esphome \
--token "${TOKEN}"
env:
TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }}

24
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Lint
on: [push, pull_request]
jobs:
build:
name: Add-on configuration
runs-on: ubuntu-latest
strategy:
matrix:
channel: [esphome, esphome-beta, esphome-dev]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2
- name: 🛠 Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: 🛠 Install dependencies
run: pip install -r script/requirements.txt
- name: 🛠 Generate files from template
run: python script/generate.py dev beta stable
- name: 🚀 Run Home Assistant Add-on Lint on ${{ matrix.channel }}
uses: frenck/action-addon-linter@v2
with:
path: "./${{ matrix.channel }}"

View File

@@ -0,0 +1 @@
Any edits should be made to the files in the 'template' directory

View File

@@ -89,7 +89,11 @@ authentication by setting it to `true`.
Manually override which ESPHome version to use in the add-on.
For example to install the latest development version, use `"esphome_version": "dev"`,
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
This can also be used to specify a branch of a fork of the esphome repository.
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
This usage assumes the forked repository is named `esphome`.
Please note that this does not always work and is only meant for testing, usually the
ESPHome add-on and dashboard version must match to guarantee a working system.

View File

@@ -5,12 +5,8 @@
"aarch64"
],
"auth_api": true,
"auto_uart": true,
"boot": "auto",
"description": "Beta version of ESPHome Hass.io add-on.",
"hassio_api": true,
"hassio_role": "default",
"homeassistant_api": false,
"host_network": true,
"image": "esphome/esphome-hassio-{arch}",
"ingress": true,
@@ -20,7 +16,6 @@
"config:rw"
],
"name": "ESPHome (beta)",
"options": {},
"panel_icon": "mdi:chip",
"ports": {
"6052/tcp": null
@@ -40,8 +35,7 @@
},
"slug": "esphome-beta",
"stage": "experimental",
"startup": "application",
"uart": true,
"url": "https://beta.esphome.io/",
"version": "1.15.0b2",
"webui": "http://[HOST]:[PORT:6052]"
"version": "1.16.2"
}

View File

@@ -89,7 +89,11 @@ authentication by setting it to `true`.
Manually override which ESPHome version to use in the add-on.
For example to install the latest development version, use `"esphome_version": "dev"`,
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
This can also be used to specify a branch of a fork of the esphome repository.
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
This usage assumes the forked repository is named `esphome`.
Please note that this does not always work and is only meant for testing, usually the
ESPHome add-on and dashboard version must match to guarantee a working system.

View File

@@ -1,9 +1,7 @@
{
"args": {},
"build_from": {
"aarch64": "esphome/esphome-hassio-base-aarch64:2.3.4",
"amd64": "esphome/esphome-hassio-base-amd64:2.3.4",
"armv7": "esphome/esphome-hassio-base-armv7:2.3.4"
},
"squash": false
"aarch64": "esphome/esphome-hassio-base-aarch64:2.5.0",
"amd64": "esphome/esphome-hassio-base-amd64:2.5.0",
"armv7": "esphome/esphome-hassio-base-armv7:2.5.0"
}
}

View File

@@ -5,12 +5,9 @@
"aarch64"
],
"auth_api": true,
"auto_uart": true,
"boot": "auto",
"uart": true,
"description": "Development Version! Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files",
"hassio_api": true,
"hassio_role": "default",
"homeassistant_api": false,
"host_network": true,
"ingress": true,
"ingress_port": 0,
@@ -41,8 +38,6 @@
},
"slug": "esphome-dev",
"stage": "experimental",
"startup": "application",
"url": "https://next.esphome.io/",
"version": "dev",
"webui": "http://[HOST]:[PORT:6052]"
"version": "dev"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1 @@
Any edits should be made to the files in the 'template' directory

View File

@@ -89,7 +89,11 @@ authentication by setting it to `true`.
Manually override which ESPHome version to use in the add-on.
For example to install the latest development version, use `"esphome_version": "dev"`,
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
This can also be used to specify a branch of a fork of the esphome repository.
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
This usage assumes the forked repository is named `esphome`.
Please note that this does not always work and is only meant for testing, usually the
ESPHome add-on and dashboard version must match to guarantee a working system.

View File

@@ -1,17 +1,12 @@
{
"arch": [
"amd64",
"i386",
"armv7",
"aarch64"
],
"auth_api": true,
"auto_uart": true,
"boot": "auto",
"description": "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices.",
"hassio_api": true,
"hassio_role": "default",
"homeassistant_api": false,
"host_network": true,
"image": "esphome/esphome-hassio-{arch}",
"ingress": true,
@@ -21,13 +16,12 @@
"config:rw"
],
"name": "ESPHome",
"options": {},
"panel_icon": "mdi:chip",
"ports": {
"6052/tcp": null
},
"ports_description": {
"6052/tcp": "Web interface (Not required for Hass.io Ingress)"
"6052/tcp": "Web interface (Not required for Home Assistant Ingress)"
},
"schema": {
"certfile": "str?",
@@ -40,8 +34,7 @@
"streamer_mode": "bool?"
},
"slug": "esphome",
"startup": "application",
"uart": true,
"url": "https://esphome.io/",
"version": "1.14.5",
"webui": "http://[HOST]:[PORT:6052]"
"version": "1.16.2"
}

View File

@@ -38,12 +38,14 @@ def main(args):
for file_, conf_ in copyf.items():
copyfile(templ / file_, dir_ / file_)
path = dir_ / 'FILES ARE GENERATED DO NOT EDIT'
with open(path, 'w') as f:
f.write("Any edits should be made to the files in the 'template' directory")
if channel == Channel.dev:
path = dir_ / 'build.json'
build_conf = {
'squash': False,
"build_from": {arch: base_image.format(arch=arch) for arch in conf['arch']},
"args": {}
"build_from": {arch: base_image.format(arch=arch) for arch in conf['arch']}
}
with open(path, 'w') as f:
json.dump(build_conf, f, indent=2, sort_keys=True)

View File

@@ -89,7 +89,11 @@ authentication by setting it to `true`.
Manually override which ESPHome version to use in the add-on.
For example to install the latest development version, use `"esphome_version": "dev"`,
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
This can also be used to specify a branch of a fork of the esphome repository.
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
This usage assumes the forked repository is named `esphome`.
Please note that this does not always work and is only meant for testing, usually the
ESPHome add-on and dashboard version must match to guarantee a working system.

View File

@@ -1,9 +1,6 @@
---
base: &base
url: https://esphome.io/
webui: 'http://[HOST]:[PORT:6052]'
startup: application
boot: auto
arch:
- amd64
- armv7
@@ -11,9 +8,6 @@ base: &base
# Uses Hass.io API (auth)
hassio_api: true
auth_api: true
hassio_role: default
# Doesn't use HA API
homeassistant_api: false
# Host network mode for mDNS
host_network: true
# Ingress settings
@@ -21,7 +15,7 @@ base: &base
ingress_port: 0
panel_icon: 'mdi:chip'
# Automatically add UART devices to addon
auto_uart: true
uart: true
ports:
'6052/tcp': null
ports_description:
@@ -38,7 +32,7 @@ base: &base
streamer_mode: bool?
relative_url: str?
status_use_ping: bool?
base_image: esphome/esphome-hassio-base-{arch}:2.3.4
base_image: esphome/esphome-hassio-base-{arch}:2.5.0
esphome-dev:
<<: *base
@@ -56,24 +50,21 @@ esphome-beta:
<<: *base
directory: esphome-beta
name: ESPHome (beta)
version: '1.15.0b2' # BETA
version: '1.16.2' # BETA
slug: esphome-beta
description: "Beta version of ESPHome Hass.io add-on."
url: https://beta.esphome.io/
image: esphome/esphome-hassio-{arch}
stage: experimental
options: {}
esphome-stable:
<<: *base
directory: esphome
name: ESPHome
version: '1.14.5' # STABLE
version: '1.16.2' # STABLE
slug: esphome
description: "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices."
image: esphome/esphome-hassio-{arch}
stage: stable
options: {}
copy_files:
icon.png: