Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.17.0 #1740

Merged
merged 114 commits into from
May 3, 2021
Merged

1.17.0 #1740

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
a269098
Bump version to v1.17.0-dev
jesserockz Jan 8, 2021
93e35a5
fix safe_mode (#1421)
alexyao2015 Jan 8, 2021
699696e
DS1307 real time clock component (#1441)
badbadc0ffee Jan 8, 2021
5df398e
Add encode_uint32 method (#1427)
e28eta Jan 10, 2021
02dc49c
Rotary Encoder: Don't call callbacks in the isr (#1456)
mknjc Jan 10, 2021
96ab6b5
API: copy the data to send into the tcp internal buffer (#1455)
mknjc Jan 11, 2021
86385a1
Revert esptool to 2.8 (#1460)
glmnet Jan 11, 2021
3c34b53
Whirlpool ac (#1467)
mmanza Jan 12, 2021
4008191
Bump pytest-mock from 3.3.1 to 3.5.1 (#1458)
dependabot[bot] Jan 12, 2021
fbc1b3e
Add rc522 i2c (#1432)
glmnet Jan 12, 2021
bf453ad
make time components polling components (#1443)
badbadc0ffee Jan 12, 2021
e7b1d2e
Bump voluptuous from 0.12.0 to 0.12.1 (#1411)
dependabot[bot] Jan 13, 2021
36089a1
Updated Mcp3008 to support reference_voltage and voltage_sampler::Vol…
SenexCrenshaw Jan 13, 2021
5fcd1e3
Add NDEF reading and writing to PN532 (#1351)
jesserockz Jan 14, 2021
d9a2651
Inkplate 6 support for ESPHome (#1283)
davidzovko Jan 16, 2021
4c10539
time sync notification (#1442)
badbadc0ffee Jan 18, 2021
b28735d
rename read/write to read/time/write_time (#1468)
badbadc0ffee Jan 18, 2021
8352f52
Improve ccs811 precision (#1428)
TheNetAdmin Jan 22, 2021
f084ab3
Make fade_to*, lighten, and darken const (#1450)
toelke Jan 22, 2021
52c67d7
add http request tests (#1448)
glmnet Jan 23, 2021
c7c7108
codegen: Lambda improvements (#1476)
balrog-kun Jan 23, 2021
36a2ce2
SPI wasnt being disabled after display update (#1493)
SenexCrenshaw Jan 26, 2021
9d38543
Add support for string-type Tuya datapoints (#1488)
pauln Jan 26, 2021
7b9c2d2
Added options to control pulse duration on Climate_IR_LG Component (#…
mhentschke Jan 26, 2021
d3b758d
Add docker healthcheck (#1492)
Klarstein Jan 27, 2021
1d378e4
Add support for MHO-C401 (#1486)
nikito7 Jan 27, 2021
4eeb111
Allow SCD30 sensors to be optional (#1502)
jesserockz Jan 30, 2021
f402c89
fix esp8266 remote_transmitter using incorrect timings (#1465)
hcoohb Feb 1, 2021
bccaa78
RC522 increased retry loop count (#1506)
glmnet Feb 2, 2021
b351cd9
Fix PN532 SPI communication (#1511)
jesserockz Feb 5, 2021
de33771
Adding support for the Inkbird IBS-TH1 Mini sensor (#1099)
fkirill Feb 6, 2021
28e39f7
Add config validator location (#1490)
glmnet Feb 6, 2021
04d8593
Add MCP4725 DAC Component (#1418)
JJK801 Feb 6, 2021
23cf120
Added codeowners (#1487)
rspaargaren Feb 10, 2021
50006e4
Update Dockerfile health check timings (#1517)
Klarstein Feb 12, 2021
e288aa0
Fixed ST7735 transfer_byte to write_byte without `miso` (#1529)
SenexCrenshaw Feb 13, 2021
57d6185
Correct Native API Wire Format Documentation (#1528)
justin-gerhardt Feb 13, 2021
81b512a
Added energy sensor to hlw8012 (#1198)
FrankBakkerNl Feb 13, 2021
b52f7cf
MCP230xx open drain interrupt pins (#1243)
kbx81 Feb 13, 2021
a342302
st7735_conf_fixes (#1530)
SenexCrenshaw Feb 14, 2021
f95be6a
Device class attribute for sensor component (#1525)
marecabo Feb 15, 2021
dce2068
Add duration option to action start deep sleep (#1526)
nuttytree Feb 15, 2021
410fad3
fix DHT auto_detect check (#1536)
SenexCrenshaw Feb 16, 2021
c92c439
Added Waveshare 2.90inch V2 e-ink display (#1538)
K-r-i-s-t-i-a-n Feb 17, 2021
acc1af0
Add reverse_enable for max7219 (#1489)
ssieb Feb 17, 2021
6c8ace0
Fix safe mode ota flashing under certain configurations (#1534)
jesserockz Feb 17, 2021
25924ca
fix substitution losing track of document range (#1547)
glmnet Feb 20, 2021
f81cddf
Add Xiaomi Miscale v1 and v2 (#1368)
dckiller51 Feb 22, 2021
3d0310d
Add dial support for sim800l component (#1558)
spilin Feb 25, 2021
92b3672
Climate IR LG -keep previous temp and fan if swing (#1556)
Otamay Feb 25, 2021
b917233
Vl53l0x change address (#1126)
kkellner Feb 25, 2021
87154e9
Tuya: Use queue for sending command messages (#1404)
stubs12 Feb 25, 2021
4d62773
Update PULL_REQUEST_TEMPLATE.md
glmnet Feb 26, 2021
6588e93
Replace substitutions in substitutions first (#1567)
edenhaus Feb 27, 2021
69d39ef
Added heater to climate_ir_lg (#1555)
Otamay Feb 27, 2021
342d516
More yaml validation (#1568)
glmnet Feb 27, 2021
520c433
Add default device classes to sensor components (#1533)
marecabo Feb 27, 2021
08ecca8
Add send_every to uart switch for recurring data (#1514)
gabe565 Feb 27, 2021
bdf0048
Added samsung36 ir protocol (#1438)
tuxBurner Feb 27, 2021
34d3796
ADC fix: GPIO0 not usable as output if ADC_VCC is used (#1557)
ferbar Feb 28, 2021
422f0ad
Add constants for device classes of binary_sensor (#1549)
marecabo Feb 28, 2021
b17e0c2
fix path on windows escape (#1573)
glmnet Mar 2, 2021
ac25b13
Migrate ESPColor to Color (#1551)
SenexCrenshaw Mar 2, 2021
8e93735
Add support for the SM300D2 7-in-1 sensor module (#1524)
moritzgloeckl Mar 3, 2021
c5dc736
changed color temp from float to int (#1522)
codyjamestechnical Mar 3, 2021
2c77d12
Bump pytest-cov from 2.10.1 to 2.11.1 (#1483)
dependabot[bot] Mar 3, 2021
521dfe0
Bump colorlog from 4.6.2 to 4.7.2 (#1473)
dependabot[bot] Mar 3, 2021
811c13d
pins: Add three new boards (#1576)
balrog-kun Mar 3, 2021
f3fe2bd
Bump pytest from 6.2.1 to 6.2.2 (#1574)
dependabot[bot] Mar 3, 2021
1883ce1
Bump pytz from 2020.5 to 2021.1 (#1575)
dependabot[bot] Mar 3, 2021
fa290fb
Fix for waveshare 2.13in-ttgo-b73 (#1543)
nikito7 Mar 4, 2021
88b46b7
Add min/max filters (#1569)
gabe565 Mar 5, 2021
e62bf33
Bump pylint from 2.6.0 to 2.7.2 (#1582)
dependabot[bot] Mar 5, 2021
0f151a8
Extend 'uart:' with 'invert:' for esp32 (#1586)
needspeed Mar 6, 2021
c17624a
Bump platformio from 5.0.4 to 5.1.0 (#1581)
dependabot[bot] Mar 6, 2021
2b60b0f
fix servo warning (#1591)
glmnet Mar 6, 2021
6987992
add-black (#1593)
glmnet Mar 7, 2021
570ec36
MCP23XXX Refactor (#1560)
jesserockz Mar 7, 2021
d5cf4b7
Improve error checking: too many component id candidates (#1570)
glmnet Mar 7, 2021
1e227e8
Schema dump (#1564)
glmnet Mar 8, 2021
2c0fe49
Inkplate 6 Optimizations (#1592)
Sizurka Mar 8, 2021
5e5f8d5
schema-dump-pins (#1596)
glmnet Mar 9, 2021
2a12caa
change lcd clear() to clear the buffer (#1600)
ssieb Mar 11, 2021
c9ee513
PN532 - don't read extra page and fix size (#1565)
ssieb Mar 11, 2021
cd1353a
Update PULL_REQUEST_TEMPLATE.md
jesserockz Mar 12, 2021
28a72fa
Fixed component_tests config (#1608)
madron Mar 12, 2021
2e7c1d7
Added receive for Fujitsu ACs (#1577)
alex-richards Mar 13, 2021
848a5f1
Change COLOR_ON to be 255 values instead of 1 (#1594)
jesserockz Mar 14, 2021
08998ca
a4988 wait 1ms when coming out of sleep (#1597)
WeekendWarrior1 Mar 14, 2021
7708b81
Support fan speed levels (#1541)
blejdfist Mar 17, 2021
faf577a
Add option to suffix name with mac address (#1615)
jesserockz Mar 17, 2021
f34c9b3
Midea climate support (#1328)
dudanov Mar 17, 2021
a96b6e7
SPI transfer fix. Use write when no miso pin is set (#1563)
SenexCrenshaw Mar 18, 2021
b5b2036
8266 hardware spi enable with just 3 pins (#1617)
SenexCrenshaw Mar 18, 2021
f63f916
Add addressable_light display platform (#1272)
justfalter Mar 18, 2021
a77784a
Implement pulse_meter as an improvement on pulse_counter and pulse_wi…
stevebaxter Mar 19, 2021
e5b45b6
e131: fix issue 1579: limitation of maximum light count (#1619)
docteurzoidberg Mar 19, 2021
251240c
Bump platformio from 5.1.0 to 5.1.1 (#1618)
dependabot[bot] Mar 19, 2021
dedf343
Fix pulse-meter with device_class and black (#1621)
jesserockz Mar 19, 2021
818a7f1
Declare Color objects in main.cpp (#1395)
kbx81 Mar 19, 2021
91898cb
Add 2.13in-ttgo-b1 waveshare epaper module. (#1326)
matikij Mar 20, 2021
60b2d57
Bump flake8 from 3.8.4 to 3.9.0 (#1612)
dependabot[bot] Mar 20, 2021
5eeb110
Bundle platformio lib_deps in docker images (#1625)
OttoWinter Mar 20, 2021
e51b0ca
Bump protobuf from 3.13.0 to 3.15.6 (#1607)
dependabot[bot] Mar 20, 2021
452ca8e
Bump pyyaml from 5.3.1 to 5.4.1 (#1482)
dependabot[bot] Mar 20, 2021
89d0d41
Switch docker images to debian (#1626)
OttoWinter Mar 20, 2021
8f1eb77
Background calibration & ABC commands for SenseAir S8 (#1623)
nmaggioni Mar 21, 2021
af3273d
Add trigger for http actions to receive the status code (#1599)
jesserockz Mar 22, 2021
fb6c5eb
Bump version to v1.18.0-dev
jesserockz Mar 22, 2021
4d340dc
Merge branch 'dev' into bump-1.17.0b1
jesserockz Mar 22, 2021
e2e074a
Fix bump script for double quotes
jesserockz Mar 22, 2021
6114d33
Bump version to v1.17.0b1
jesserockz Mar 22, 2021
0fe61d9
Merge pull request #1636 from esphome/bump-1.17.0b1
jesserockz Mar 22, 2021
822377b
Bump version to v1.17.0
jesserockz May 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 37 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,47 @@
## Description:
# What does this implement/fix?

Quick description

**Related issue (if applicable):** fixes <link to issue>
## Types of changes

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Configuration change (this will require users to update their yaml configuration files to keep working)

**Related issue or feature (if applicable):** fixes <link to issue>

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>

# Test Environment

- [ ] ESP32
- [ ] ESP8266
- [ ] Windows
- [ ] Mac OS
- [ ] Linux

## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->

```yaml
# Example config.yaml

```

# Explain your changes

Describe your changes here to communicate to the maintainers **why we should accept this pull request**.
Very important to fill if no issue linked

## Checklist:
- [ ] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
4 changes: 2 additions & 2 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v2
- name: Set up env variables
run: |
base_version="2.6.0"
base_version="3.0.0"

if [[ "${{ matrix.build_type }}" == "hassio" ]]; then
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}"
Expand All @@ -45,7 +45,7 @@ jobs:
run: |
docker pull "${BUILD_TO}:dev" || true
- name: Register QEMU binfmt
run: docker run --rm --privileged multiarch/qemu-user-static:5.0.0-2 --reset -p yes
run: docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset -p yes
- run: |
docker build \
--build-arg "BUILD_FROM=${BUILD_FROM}" \
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ jobs:
container: esphome/esphome-lint:latest
steps:
- uses: actions/checkout@v2
# Cache platformio intermediary files (like libraries etc)
# Note: platformio platform versions should be cached via the esphome-lint image
- name: Cache Platformio
uses: actions/cache@v1
with:
path: .pio
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
lint-cpp-pio-
# Set up the pio project so that the cpp checks know how files are compiled
# (build flags, libraries etc)
- name: Set up platformio environment
Expand All @@ -49,15 +40,6 @@ jobs:
split: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v2
# Cache platformio intermediary files (like libraries etc)
# Note: platformio platform versions should be cached via the esphome-lint image
- name: Cache Platformio
uses: actions/cache@v1
with:
path: .pio
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
lint-cpp-pio-
# Set up the pio project so that the cpp checks know how files are compiled
# (build flags, libraries etc)
- name: Set up platformio environment
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ jobs:
container: esphome/esphome-lint:latest
steps:
- uses: actions/checkout@v2
# Cache platformio intermediary files (like libraries etc)
# Note: platformio platform versions should be cached via the esphome-lint image
- name: Cache Platformio
uses: actions/cache@v1
with:
path: .pio
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
lint-cpp-pio-
# Set up the pio project so that the cpp checks know how files are compiled
# (build flags, libraries etc)
- name: Set up platformio environment
Expand All @@ -46,15 +37,6 @@ jobs:
split: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v2
# Cache platformio intermediary files (like libraries etc)
# Note: platformio platform versions should be cached via the esphome-lint image
- name: Cache Platformio
uses: actions/cache@v1
with:
path: .pio
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
lint-cpp-pio-
# Set up the pio project so that the cpp checks know how files are compiled
# (build flags, libraries etc)
- name: Set up platformio environment
Expand Down Expand Up @@ -192,7 +174,7 @@ jobs:
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Set up env variables
run: |
base_version="2.6.0"
base_version="3.0.0"

if [[ "${{ matrix.build_type }}" == "hassio" ]]; then
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}"
Expand All @@ -211,7 +193,7 @@ jobs:
run: |
docker pull "${BUILD_TO}:dev" || true
- name: Register QEMU binfmt
run: docker run --rm --privileged multiarch/qemu-user-static:5.0.0-2 --reset -p yes
run: docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset -p yes
- run: |
docker build \
--build-arg "BUILD_FROM=${BUILD_FROM}" \
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ jobs:
container: esphome/esphome-lint:latest
steps:
- uses: actions/checkout@v2
# Cache platformio intermediary files (like libraries etc)
# Note: platformio platform versions should be cached via the esphome-lint image
- name: Cache Platformio
uses: actions/cache@v1
with:
path: .pio
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
lint-cpp-pio-
# Set up the pio project so that the cpp checks know how files are compiled
# (build flags, libraries etc)
- name: Set up platformio environment
Expand All @@ -45,15 +36,6 @@ jobs:
split: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v2
# Cache platformio intermediary files (like libraries etc)
# Note: platformio platform versions should be cached via the esphome-lint image
- name: Cache Platformio
uses: actions/cache@v1
with:
path: .pio
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
lint-cpp-pio-
# Set up the pio project so that the cpp checks know how files are compiled
# (build flags, libraries etc)
- name: Set up platformio environment
Expand Down Expand Up @@ -212,7 +194,7 @@ jobs:
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Set up env variables
run: |
base_version="2.6.0"
base_version="3.0.0"

if [[ "${{ matrix.build_type }}" == "hassio" ]]; then
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}"
Expand All @@ -239,7 +221,7 @@ jobs:
run: |
docker pull "${BUILD_TO}:${CACHE_TAG}" || true
- name: Register QEMU binfmt
run: docker run --rm --privileged multiarch/qemu-user-static:5.0.0-2 --reset -p yes
run: docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset -p yes
- run: |
docker build \
--build-arg "BUILD_FROM=${BUILD_FROM}" \
Expand Down
30 changes: 23 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: flake8
- id: black
args:
- --safe
- --quiet
files: ^((esphome|script|tests)/.+)?[^/]+\.py$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.5.0
- pydocstyle==5.1.1
files: ^(esphome|tests)/.+\.py$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: no-commit-to-branch
args:
- --branch=dev
- --branch=master
- --branch=beta
15 changes: 13 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ esphome/core/* @esphome/core
# Integrations
esphome/components/ac_dimmer/* @glmnet
esphome/components/adc/* @esphome/core
esphome/components/addressable_light/* @justfalter
esphome/components/animation/* @syndlex
esphome/components/api/* @OttoWinter
esphome/components/async_tcp/* @OttoWinter
Expand All @@ -37,17 +38,26 @@ esphome/components/globals/* @esphome/core
esphome/components/gpio/* @esphome/core
esphome/components/homeassistant/* @OttoWinter
esphome/components/i2c/* @esphome/core
esphome/components/inkbird_ibsth1_mini/* @fkirill
esphome/components/inkplate6/* @jesserockz
esphome/components/integration/* @OttoWinter
esphome/components/interval/* @esphome/core
esphome/components/json/* @OttoWinter
esphome/components/ledc/* @OttoWinter
esphome/components/light/* @esphome/core
esphome/components/logger/* @esphome/core
esphome/components/mcp23s08/* @SenexCrenshaw
esphome/components/mcp23s17/* @SenexCrenshaw
esphome/components/max7219digit/* @rspaargaren
esphome/components/mcp23008/* @jesserockz
esphome/components/mcp23017/* @jesserockz
esphome/components/mcp23s08/* @SenexCrenshaw @jesserockz
esphome/components/mcp23s17/* @SenexCrenshaw @jesserockz
esphome/components/mcp23x08_base/* @jesserockz
esphome/components/mcp23x17_base/* @jesserockz
esphome/components/mcp23xxx_base/* @jesserockz
esphome/components/mcp2515/* @danielschramm @mvturnho
esphome/components/mcp9808/* @k7hpn
esphome/components/midea_ac/* @dudanov
esphome/components/midea_dongle/* @dudanov
esphome/components/network/* @esphome/core
esphome/components/nfc/* @jesserockz
esphome/components/ota/* @esphome/core
Expand All @@ -57,6 +67,7 @@ esphome/components/pn532/* @OttoWinter @jesserockz
esphome/components/pn532_i2c/* @OttoWinter @jesserockz
esphome/components/pn532_spi/* @OttoWinter @jesserockz
esphome/components/power_supply/* @esphome/core
esphome/components/pulse_meter/* @stevebaxter
esphome/components/rc522/* @glmnet
esphome/components/rc522_i2c/* @glmnet
esphome/components/rc522_spi/* @glmnet
Expand Down
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ARG BUILD_FROM=esphome/esphome-base-amd64:2.6.0
ARG BUILD_FROM=esphome/esphome-base-amd64:3.0.0
FROM ${BUILD_FROM}

# First install requirements to leverage caching when requirements don't change
COPY requirements.txt /
RUN pip3 install --no-cache-dir -r /requirements.txt
COPY requirements.txt docker/platformio_install_deps.py platformio.ini /
RUN \
pip3 install --no-cache-dir -r /requirements.txt \
&& /platformio_install_deps.py /platformio.ini

# Then copy esphome and install
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM esphome/esphome-base-amd64:2.6.0
FROM esphome/esphome-base-amd64:3.0.0

COPY . .

Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.hassio
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ ARG BUILD_FROM
FROM ${BUILD_FROM}

# First install requirements to leverage caching when requirements don't change
COPY requirements.txt /
RUN pip3 install --no-cache-dir -r /requirements.txt
COPY requirements.txt docker/platformio_install_deps.py platformio.ini /
RUN \
pip3 install --no-cache-dir -r /requirements.txt \
&& /platformio_install_deps.py /platformio.ini

# Copy root filesystem
COPY docker/rootfs/ /
Expand Down
8 changes: 5 additions & 3 deletions docker/Dockerfile.lint
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM esphome/esphome-lint-base:2.6.0
FROM esphome/esphome-lint-base:3.0.0

COPY requirements.txt requirements_test.txt /
RUN pip3 install --no-cache-dir -r /requirements.txt -r /requirements_test.txt
COPY requirements.txt requirements_test.txt docker/platformio_install_deps.py platformio.ini /
RUN \
pip3 install --no-cache-dir -r /requirements.txt -r /requirements_test.txt \
&& /platformio_install_deps.py /platformio.ini

VOLUME ["/esphome"]
WORKDIR /esphome
20 changes: 20 additions & 0 deletions docker/platformio_install_deps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
# This script is used in the docker containers to preinstall
# all platformio libraries in the global storage

import configparser
import re
import subprocess
import sys

config = configparser.ConfigParser()
config.read(sys.argv[1])
libs = []
for line in config['common']['lib_deps'].splitlines():
# Format: '1655@1.0.2 ; TinyGPSPlus (has name conflict)' (includes comment)
m = re.search(r'([a-zA-Z0-9-_/]+@[0-9\.]+)', line)
if m is None:
continue
libs.append(m.group(1))

subprocess.check_call(['platformio', 'lib', '-g', 'install', *libs])