Compare commits

..

114 Commits

Author SHA1 Message Date
Joakim Sørensen
564e9811d0 Use brotlipy instead of Brotli (#2977) 2021-06-24 19:12:48 +02:00
Pascal Vizeli
b944b52b21 Add running job condition to OS update (#2976) 2021-06-24 16:06:06 +02:00
dependabot[bot]
24aecdddf3 Bump docker/login-action from 1.9.0 to 1.10.0 (#2975)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-24 12:48:33 +02:00
Stefan Agner
7bbfb60039 Allow upgrade when using {os_name} in URL (#2974)
Once {os_name} is part of the update URL we also need to set the OS name
explicitly for upgrades: A user might use a new Supervisor version on a
OS release 5 device. The device will still use "hassos" as OS name.
Before introducing {os_name}, the new OS name was part of the URL. Now
when {os_name} is used, we need to adjust the name for upgrade as well.
2021-06-24 08:39:50 +02:00
Pascal Vizeli
ece40008c7 Logging in local timezone (#2971)
* Logging in local timezone

* fix convert

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-06-21 13:42:39 +02:00
Pascal Vizeli
0177b38ded Support HOT/COLD snapshots for Add-ons (#2943)
* Support HOT/COLD snapshots for Add-ons

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Add warning

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-06-21 09:07:54 +02:00
Stefan Agner
16f2f63081 Allow downgrade to "hassos" from "haos" (#2970)
* Add "os_name" as possible URL variable

* Replace "os_name" for downgrades to OS versions before 6.0
2021-06-19 18:50:54 +02:00
Pascal Vizeli
5f376c2a27 Using images data from version file (#2969)
* Using images data from version file

* fix tests
2021-06-18 22:59:11 +02:00
dependabot[bot]
90a6f109ee Bump gitpython from 3.1.17 to 3.1.18 (#2967)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.17 to 3.1.18.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.17...3.1.18)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-18 13:32:53 +02:00
dependabot[bot]
e6fd0ef5dc Bump actions/upload-artifact from 2.2.3 to 2.2.4 (#2965)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.3...v2.2.4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-17 09:49:28 +02:00
Joakim Sørensen
d46ab56901 Update frontend to 446a9b5c (#2962) 2021-06-16 11:45:28 +02:00
Pascal Vizeli
3b1ad5c0cd Run API watchdog only if core is running (#2961)
* Run API watchdog only if core is running

* negate

* fix comment
2021-06-16 11:45:06 +02:00
Joakim Sørensen
de8a241e72 When validating add-ons transform core-addons url (#2960) 2021-06-15 15:06:40 +02:00
Pascal Vizeli
a4a0b43d91 Using ghcr.io/home-assistant + fallback (#2959) 2021-06-14 20:07:44 +02:00
Pascal Vizeli
adf355e54f Fix API watchdog never trigger (#2958) 2021-06-14 14:11:22 +02:00
Joakim Sørensen
4f9e646b4c Fix addon_pwned enabled setter (#2952)
* Fix addon_pwned enabled setter

* whatever

* adjust
2021-06-14 11:33:53 +02:00
dependabot[bot]
ce57d384ca Bump pyupgrade from 2.19.3 to 2.19.4 (#2957)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.19.3 to 2.19.4.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.19.3...v2.19.4)

---
updated-dependencies:
- dependency-name: pyupgrade
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-14 11:32:50 +02:00
Pascal Vizeli
d53d526673 Add-on: Block update itself (#2956)
* Add-on: Block update itself

* Better logging

* Update
2021-06-14 10:37:59 +02:00
Pascal Vizeli
cd8fc16bcb Cleanup security layer - Add-on default access role (#2954)
* Allow access to network info (add-on)

* fix check

* make it nice

* cleanup

* cleanup

* fix tests

* Add warning

* allow access to addons/store/snapshot infos

* revert
2021-06-14 10:05:37 +02:00
dependabot[bot]
6b58970354 Bump black from 21.5b2 to 21.6b0 (#2953)
* Bump black from 21.5b2 to 21.6b0

Bumps [black](https://github.com/psf/black) from 21.5b2 to 21.6b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update .pre-commit-config.yaml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2021-06-13 12:44:11 +02:00
Joakim Sørensen
b70ed9a60d Rename fixtures (#2946)
* Rename fixtures

* Use tilde
2021-06-10 12:45:39 +02:00
dependabot[bot]
22c8ff1314 Bump pyupgrade from 2.19.1 to 2.19.3 (#2948)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.19.1 to 2.19.3.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.19.1...v2.19.3)

---
updated-dependencies:
- dependency-name: pyupgrade
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-10 11:39:16 +02:00
Stefan Agner
ba2cf8078e Bump awesomeversion to 21.6.0 (#2949) 2021-06-10 10:15:43 +02:00
dependabot[bot]
ef138b619b Bump pulsectl from 21.5.17 to 21.5.18 (#2911)
Bumps [pulsectl](https://github.com/mk-fg/python-pulse-control) from 21.5.17 to 21.5.18.
- [Release notes](https://github.com/mk-fg/python-pulse-control/releases)
- [Changelog](https://github.com/mk-fg/python-pulse-control/blob/master/CHANGES.rst)
- [Commits](https://github.com/mk-fg/python-pulse-control/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 14:38:30 +02:00
dependabot[bot]
9252af5ddb Bump codecov/codecov-action from 1.5.0 to 1.5.2 (#2942)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1.5.0 to 1.5.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.5.0...v1.5.2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 10:39:24 +02:00
Pascal Vizeli
bcef34012d Time handling (#2901)
* Add new time handling

* migrate date for python3.9

* add timedate

* add tests & simplify it

* better testing

* use ssl

* use hostname with new interface

* expose to API

* update data

* add base handler

* new timezone handling

* improve handling

* Improve handling

* Add tests

* Time adjustment function

* Fix logging

* tweak condition

* don't adjust synchronized time

* Guard

* ignore UTC

* small cleanup

* like that, we can leaf it

* add URL

* add comment

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-06-09 09:38:32 +02:00
Stefan Agner
2f18c177ae Introduce pre-/post-snapshot commands (#2941)
Introduce commands which are run before and after a snapshot is being
taken. This is useful for e.g. for database add-ons to suspend write
operations during snapshot.
2021-06-08 21:44:31 +02:00
dependabot[bot]
12487fb69d Bump home-assistant/builder from 2021.05.0 to 2021.06.2 (#2939)
Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2021.05.0 to 2021.06.2.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2021.05.0...2021.06.2)

---
updated-dependencies:
- dependency-name: home-assistant/builder
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 21:41:50 +02:00
Joakim Sørensen
e629bab8ee Fix setting audio profile (#2934) 2021-06-04 14:18:23 +02:00
Joakim Sørensen
e85d7c3d2e Update frontend to a45b8ca8 (#2936) 2021-06-04 14:05:50 +02:00
Joakim Sørensen
64c59d0fe9 Lmit ensure_access_token (#2931) 2021-06-03 11:03:46 +02:00
dependabot[bot]
522cbe3295 Bump pytest-cov from 2.12.0 to 2.12.1 (#2930)
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.12.0...v2.12.1)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-02 12:31:44 +02:00
Sergio Oller
fd185fc326 Minor spelling fixes (#2929) 2021-06-02 11:50:07 +02:00
dependabot[bot]
6ddc135266 Bump pylint from 2.8.2 to 2.8.3 (#2924)
Bumps [pylint](https://github.com/PyCQA/pylint) from 2.8.2 to 2.8.3.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Changelog](https://github.com/PyCQA/pylint/blob/master/ChangeLog)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.8.2...v2.8.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-01 15:49:02 +02:00
dependabot[bot]
f8d5279d9c Bump black from 21.5b1 to 21.5b2 (#2926)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-01 15:48:28 +02:00
dependabot[bot]
2acae9af57 Bump pyupgrade from 2.19.0 to 2.19.1 (#2925)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.19.0 to 2.19.1.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.19.0...v2.19.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-01 14:38:05 +02:00
Pascal Vizeli
b425d21d05 Adjust content-trust core version (#2923) 2021-05-31 11:48:37 +02:00
dependabot[bot]
4c7ba20a58 Bump pyupgrade from 2.18.3 to 2.19.0 (#2922)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.18.3 to 2.19.0.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.18.3...v2.19.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-31 10:19:39 +02:00
dependabot[bot]
a4f325dd2e Bump actions/cache from 2.1.5 to 2.1.6 (#2916)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 11:09:30 +02:00
Stefan Agner
a99bfa2926 Update OS on intel-nuc to generic-x86-64 image (#2909)
* Add architectures supported by generic-x86-64 board

* Follow intel-nuc to generic-x86-64 rename when updating

Home Assistant OS renamed the intel-nuc board to generic-x86-64. Make
sure to download the generic-x86-64 raucb OS update when updating a
intel-nuc machine.

* Don't explicit use section, rely on AwesomeVersion's comparision

* Remove unecessary global variable TEST_URL

* Fix version comparision

* Remove rate limiter on updater.fetch_data()

* Update tests/test_hassos.py

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

* Fix black issue

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-05-27 14:25:16 +02:00
Joakim Sørensen
bb127a614b Bump frontend to 59f3f819 (#2915) 2021-05-27 10:53:14 +02:00
Joakim Sørensen
6f2f005897 Update frontend to fa9c6a76 (#2914) 2021-05-26 15:35:20 +02:00
dependabot[bot]
e22a20c165 Bump pre-commit from 2.12.1 to 2.13.0 (#2912)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-25 10:58:39 +02:00
dependabot[bot]
20c2121e5f Bump pyupgrade from 2.18.1 to 2.18.3 (#2913)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.18.1 to 2.18.3.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.18.1...v2.18.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-25 09:42:44 +02:00
dependabot[bot]
8a5831d6b2 Bump pyupgrade from 2.17.0 to 2.18.1 (#2910)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.17.0 to 2.18.1.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.17.0...v2.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-21 14:50:01 +02:00
Franck Nijhof
fb81946240 Fix Watchdog port being used as string (#2903) 2021-05-19 17:32:31 +02:00
dependabot[bot]
4bec86c58c Bump pydocstyle from 6.0.0 to 6.1.1 (#2895)
Bumps [pydocstyle](https://github.com/PyCQA/pydocstyle) from 6.0.0 to 6.1.1.
- [Release notes](https://github.com/PyCQA/pydocstyle/releases)
- [Changelog](https://github.com/PyCQA/pydocstyle/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/PyCQA/pydocstyle/compare/6.0.0...6.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 12:45:39 +02:00
dependabot[bot]
7034b79991 Bump pyupgrade from 2.16.0 to 2.17.0 (#2894)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.16.0...v2.17.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 12:41:39 +02:00
dependabot[bot]
7b9a09dc4b Bump pulsectl from 21.5.6 to 21.5.17 (#2892)
Bumps [pulsectl](https://github.com/mk-fg/python-pulse-control) from 21.5.6 to 21.5.17.
- [Release notes](https://github.com/mk-fg/python-pulse-control/releases)
- [Changelog](https://github.com/mk-fg/python-pulse-control/blob/master/CHANGES.rst)
- [Commits](https://github.com/mk-fg/python-pulse-control/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 12:12:58 +02:00
dependabot[bot]
0746c4dec5 Bump actions/stale from 3.0.18 to 3.0.19 (#2896)
Bumps [actions/stale](https://github.com/actions/stale) from 3.0.18 to 3.0.19.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.18...v3.0.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 11:36:46 +02:00
Joakim Sørensen
6dadb933bd Bump frontend to 245bb639 (#2897) 2021-05-19 11:34:49 +02:00
dependabot[bot]
07197e6a50 Bump jinja2 from 3.0.0 to 3.0.1 (#2900)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.0...3.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 10:27:27 +02:00
dependabot[bot]
6c79fb8325 Bump pytest-cov from 2.11.1 to 2.12.0 (#2893)
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.11.1 to 2.12.0.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.11.1...v2.12.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 10:57:24 +02:00
dependabot[bot]
7488750ee4 Bump pyupgrade from 2.15.0 to 2.16.0 (#2891)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.15.0...v2.16.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 10:41:48 +02:00
dependabot[bot]
c9574254aa Bump jinja2 from 2.11.3 to 3.0.0 (#2873)
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.3 to 3.0.0.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.3...3.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 21:28:16 +02:00
Pascal Vizeli
f466721ffa Update builder builder-2021.05.0 (#2888) 2021-05-14 19:00:23 +02:00
Joakim Sørensen
3834cead07 Update frontend to fe2fe746 (#2887) 2021-05-14 14:09:04 +02:00
dependabot[bot]
75975de201 Bump gitpython from 3.1.16 to 3.1.17 (#2884)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.16 to 3.1.17.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 14:02:23 +02:00
Pascal Vizeli
cb9f998ef1 Python 3.9 (#2886)
* Python 3.9

* Fix lint

* fix lint
2021-05-14 13:57:56 +02:00
Pascal Vizeli
eb9ce8ea1f Fix wheels host (#2885) 2021-05-14 12:18:36 +02:00
Pascal Vizeli
a5ed68b641 Cleanup websession with new aiohttp ssl (#2861) 2021-05-14 10:07:00 +02:00
Pascal Vizeli
1ef46424ea Fix tests (#2883) 2021-05-14 08:36:49 +02:00
dependabot[bot]
53c99547d0 Bump gitpython from 3.1.15 to 3.1.16 (#2882)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.15 to 3.1.16.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 16:44:15 +02:00
dependabot[bot]
a34e7622d2 Bump pulsectl from 21.5.0 to 21.5.6 (#2874)
Bumps [pulsectl](https://github.com/mk-fg/python-pulse-control) from 21.5.0 to 21.5.6.
- [Release notes](https://github.com/mk-fg/python-pulse-control/releases)
- [Changelog](https://github.com/mk-fg/python-pulse-control/blob/master/CHANGES.rst)
- [Commits](https://github.com/mk-fg/python-pulse-control/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 13:09:43 +02:00
Pascal Vizeli
b234c18664 Enable connectivity on startup (#2879)
* Check connectivity on system startup

* move it
2021-05-12 16:02:51 +02:00
dependabot[bot]
d8d594c728 Bump actions/checkout from 2 to 2.3.4 (#2877)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:39:41 +02:00
dependabot[bot]
1cd35841e8 Bump docker/login-action from 1 to 1.9.0 (#2875)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 1.9.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v1.9.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:33:18 +02:00
dependabot[bot]
d05b7edd87 Bump getsentry/action-release from 1.1 to 1.1.5 (#2876)
Bumps [getsentry/action-release](https://github.com/getsentry/action-release) from 1.1 to 1.1.5.
- [Release notes](https://github.com/getsentry/action-release/releases)
- [Commits](https://github.com/getsentry/action-release/compare/v1.1...v1.1.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:04:19 +02:00
Joakim Sørensen
95ef7d4508 Add snapshot content to list API (#2870) 2021-05-11 10:17:37 -07:00
dependabot[bot]
9812e5be6a Bump black from 21.5b0 to 21.5b1 (#2868)
Bumps [black](https://github.com/psf/black) from 21.5b0 to 21.5b1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 09:51:55 +02:00
dependabot[bot]
183182943d Bump pulsectl from 21.3.4 to 21.5.0 (#2865)
Bumps [pulsectl](https://github.com/mk-fg/python-pulse-control) from 21.3.4 to 21.5.0.
- [Release notes](https://github.com/mk-fg/python-pulse-control/releases)
- [Changelog](https://github.com/mk-fg/python-pulse-control/blob/master/CHANGES.rst)
- [Commits](https://github.com/mk-fg/python-pulse-control/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 16:17:47 +02:00
dependabot[bot]
a0189d65de Bump attrs from 21.1.0 to 21.2.0 (#2864)
Bumps [attrs](https://github.com/python-attrs/attrs) from 21.1.0 to 21.2.0.
- [Release notes](https://github.com/python-attrs/attrs/releases)
- [Changelog](https://github.com/python-attrs/attrs/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/python-attrs/attrs/compare/21.1.0...21.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 14:35:33 +02:00
Pascal Vizeli
b59f741162 Validate secrets on options/validate UI check (#2854)
* Validate secrets on options/validate UI check

* Allow schema as payload

* Update supervisor/api/addons.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Offload into a module

* using new function

* disable check

* fix options value

* generated return value

* add debug logging

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-10 14:27:50 +02:00
dependabot[bot]
efc2e826a1 Bump flake8 from 3.9.1 to 3.9.2 (#2866)
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.9.1 to 3.9.2.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.9.1...3.9.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 13:27:41 +02:00
dependabot[bot]
a3ad23e262 Bump pyupgrade from 2.14.0 to 2.15.0 (#2867)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.14.0 to 2.15.0.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.14.0...v2.15.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 13:27:31 +02:00
Joakim Sørensen
5e3bcbfaac Bump awesomeversion to 21.5.0 (#2862) 2021-05-07 21:55:13 +02:00
dependabot[bot]
7f3e4558b9 Bump sentry-sdk from 1.0.0 to 1.1.0 (#2860)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/1.0.0...1.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 14:04:37 +02:00
dependabot[bot]
567a01c2ed Bump attrs from 20.3.0 to 21.1.0 (#2858)
Bumps [attrs](https://github.com/python-attrs/attrs) from 20.3.0 to 21.1.0.
- [Release notes](https://github.com/python-attrs/attrs/releases)
- [Changelog](https://github.com/python-attrs/attrs/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/python-attrs/attrs/compare/20.3.0...21.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 13:48:31 +02:00
dependabot[bot]
2236cf146e Bump black from 21.4b2 to 21.5b0 (#2857)
* Bump black from 21.4b2 to 21.5b0

Bumps [black](https://github.com/psf/black) from 21.4b2 to 21.5b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

* Update .pre-commit-config.yaml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2021-05-07 13:47:57 +02:00
dependabot[bot]
8e2f33ba1e Bump debugpy from 1.2.1 to 1.3.0 (#2855)
Bumps [debugpy](https://github.com/microsoft/debugpy) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/microsoft/debugpy/releases)
- [Commits](https://github.com/microsoft/debugpy/compare/v1.2.1...v1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 13:47:44 +02:00
dependabot[bot]
8190883a71 Bump pytest from 6.2.3 to 6.2.4 (#2856)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.3...6.2.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 10:08:18 +02:00
dependabot[bot]
c01218a97a Bump codecov/codecov-action from v1.4.1 to v1.5.0 (#2853)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.4.1 to v1.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.4.1...a1ed4b322b4b38cb846afb5a0ebfa17086917d27)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-04 10:59:02 +02:00
dependabot[bot]
2437817a41 Bump pyupgrade from 2.13.0 to 2.14.0 (#2852)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.13.0 to 2.14.0.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.13.0...v2.14.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-03 12:43:26 +02:00
Pascal Vizeli
682ee4529e Check integritiy of core (#2851) 2021-05-03 11:44:46 +02:00
Franck Nijhof
cee520f0b5 Add discovery support for motionEye (#2850) 2021-04-29 23:35:57 +02:00
Pascal Vizeli
0d915a3efc Handle iptables better WSL2 (#2849) 2021-04-29 12:31:34 +02:00
dependabot[bot]
f3a562006a Bump black from 21.4b1 to 21.4b2 (#2848)
Bumps [black](https://github.com/psf/black) from 21.4b1 to 21.4b2.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-29 10:41:03 +02:00
Pascal Vizeli
d78091cc60 Switch back to jemalloc (#2847) 2021-04-28 17:02:28 +02:00
Pascal Vizeli
f785c4e909 Fix WSL2 issues + cleanup scripts (#2846) 2021-04-28 14:09:37 +02:00
Pascal Vizeli
cda66ba737 Update black 21.4b1 on pre-commit (#2845) 2021-04-28 13:05:40 +02:00
dependabot[bot]
ea68ffc5a4 Bump black from 21.4b0 to 21.4b1 (#2844)
Bumps [black](https://github.com/psf/black) from 21.4b0 to 21.4b1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-28 10:59:08 +02:00
Franck Nijhof
31b0b721c8 Update GitHub issue form with render field (#2841) 2021-04-26 22:16:28 +02:00
Pascal Vizeli
b97e33f5d5 Ignore version on supervisor update (#2840)
* Ignore version on supervisor update

* fix property
2021-04-26 19:48:57 +02:00
Pascal Vizeli
29e55d3664 Clean env on remove-folder (#2839) 2021-04-26 19:47:46 +02:00
Joakim Sørensen
9112f27dc0 Update frontend to 4d287a1f (#2838) 2021-04-26 17:01:15 +02:00
eparla774
9e67df26b3 Fix for bug in host network info collector (#2821)
* Fix for bug in host network info collector

Fixed bug in host network info collector (Issue #2779)

* Added psk to authentification

* Fixed error

* Fixed error

* Update network.py
2021-04-26 16:37:06 +02:00
dependabot[bot]
37d1a577ef Bump black from 20.8b1 to 21.4b0 (#2837)
Bumps [black](https://github.com/psf/black) from 20.8b1 to 21.4b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-26 13:02:45 +02:00
dependabot[bot]
1eebb31004 Bump gitpython from 3.1.14 to 3.1.15 (#2831)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.14 to 3.1.15.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.14...3.1.15)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-23 10:37:38 +02:00
dependabot[bot]
885764ea1c Bump pyupgrade from 2.12.0 to 2.13.0 (#2832)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.12.0 to 2.13.0.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.12.0...v2.13.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 13:15:35 +02:00
dependabot[bot]
b3d184b5c7 Bump codecov/codecov-action from v1.4.0 to v1.4.1 (#2830)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.4.0 to v1.4.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.4.0...967e2b38a85a62bd61be5529ada27ebc109948c2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 13:05:20 +02:00
Franck Nijhof
96d04ec17e Update GitHub issue form (#2827) 2021-04-20 12:24:08 +02:00
dependabot[bot]
e0bb3ad609 Bump codecov/codecov-action from v1.3.2 to v1.4.0 (#2826)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.3.2 to v1.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.3.2...0e28ff86a50029a44d10df6ed4c308711925a6a8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 12:20:34 +02:00
dependabot[bot]
1a8842cb81 Bump pre-commit from 2.12.0 to 2.12.1 (#2825)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.12.0...v2.12.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 12:02:56 +02:00
Pascal Vizeli
092d526749 Clean env on subprocess (#2819)
* Clean env on subprocess

* use new format
2021-04-16 16:01:36 +02:00
Pascal Vizeli
9db95c188a Add more image-spec annotations (#2818) 2021-04-16 11:21:37 +02:00
dependabot[bot]
0e45fc7d66 Bump flake8 from 3.9.0 to 3.9.1 (#2817)
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.9.0 to 3.9.1.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.9.0...3.9.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-16 10:33:32 +02:00
Pascal Vizeli
4d1ddbfa2b Using exists container on publish (#2816) 2021-04-15 16:41:33 +02:00
Pascal Vizeli
caa1c6f1bd Using mimalloc (#2815) 2021-04-15 16:15:38 +02:00
dependabot[bot]
10d686b415 Bump home-assistant/builder from 2021.04.1 to 2021.04.2 (#2814)
Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2021.04.1 to 2021.04.2.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2021.04.1...fda1b6e500d815a890d62156188f09265a3a99e6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-15 10:59:52 +02:00
Pascal Vizeli
29fae90da5 Extend supervisor CI checks (#2813) 2021-04-15 10:50:07 +02:00
Pascal Vizeli
e27337da85 Improve local build / allow cache on dev (#2810) 2021-04-15 08:19:58 +02:00
dependabot[bot]
8f22316869 Bump colorlog from 4.8.0 to 5.0.1 (#2808)
Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 4.8.0 to 5.0.1.
- [Release notes](https://github.com/borntyping/python-colorlog/releases)
- [Commits](https://github.com/borntyping/python-colorlog/compare/v4.8.0...v5.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-14 17:01:27 +02:00
Joakim Sørensen
dd10d3e037 Guard against multiple client creations (#2809) 2021-04-14 14:30:49 +02:00
dependabot[bot]
4a53c62af8 Bump home-assistant/builder from 2021.04.0 to 2021.04.1 (#2807)
Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2021.04.0 to 2021.04.1.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2021.04.0...b77028ab08315dd69807752d2f3e00b0f0f49786)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-14 14:30:31 +02:00
471 changed files with 12251 additions and 9458 deletions

View File

@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.8
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.9
ENV DEBIAN_FRONTEND=noninteractive

View File

@@ -1,8 +1,6 @@
name: Bug Report Form
about: Report an issue related to the Home Assistant Supervisor.
description: Report an issue related to the Home Assistant Supervisor.
labels: bug
title: ""
issue_body: true
body:
- type: markdown
attributes:
@@ -90,17 +88,11 @@ body:
label: Anything in the Supervisor logs that might be useful for us?
description: >
The Supervisor logs can be found in the Supervisor panel -> System tab.
value: |
```txt
# Put your logs below this line
```
- type: markdown
render: txt
- type: textarea
attributes:
value: |
## Additional information
- type: markdown
attributes:
value: |
label: Additional information
description: >
If you have any additional information for us, use the field below.
Please note, you can attach screenshots or screen recordings here.
Please note, you can attach screenshots or screen recordings here, by
dragging and dropping files in the field below.

View File

@@ -35,7 +35,7 @@ on:
env:
BUILD_NAME: supervisor
BUILD_TYPE: supervisor
WHEELS_TAG: 3.8-alpine3.13
WHEELS_TAG: 3.9-alpine3.13
jobs:
init:
@@ -49,7 +49,7 @@ jobs:
requirements: ${{ steps.requirements.outputs.changed }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
@@ -71,7 +71,7 @@ jobs:
- name: Check if requirements files changed
id: requirements
run: |
if [[ "${{ steps.changed_files.outputs.all }}" =~ requirements.txt ]]; then
if [[ "${{ steps.changed_files.outputs.all }}" =~ (requirements.txt|build.json) ]]; then
echo "::set-output name=changed::true"
fi
@@ -84,7 +84,7 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
@@ -94,7 +94,7 @@ jobs:
with:
tag: ${{ env.WHEELS_TAG }}
arch: ${{ matrix.arch }}
wheels-host: ${{ secrets.WHEELS_HOST }}
wheels-host: wheels.hass.io
wheels-key: ${{ secrets.WHEELS_KEY }}
wheels-user: wheels
apk: "build-base;libffi-dev;openssl-dev;cargo"
@@ -109,14 +109,14 @@ jobs:
- name: Login to DockerHub
if: needs.init.outputs.publish == 'true'
uses: docker/login-action@v1
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: needs.init.outputs.publish == 'true'
uses: docker/login-action@v1
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: ${{ secrets.GIT_USER }}
@@ -127,7 +127,7 @@ jobs:
run: echo "BUILD_ARGS=--test" >> $GITHUB_ENV
- name: Build supervisor
uses: home-assistant/builder@2021.04.0
uses: home-assistant/builder@2021.06.2
with:
args: |
$BUILD_ARGS \
@@ -135,7 +135,6 @@ jobs:
--target /data \
--with-codenotary "${{ secrets.VCN_USER }}" "${{ secrets.VCN_PASSWORD }}" "${{ secrets.VCN_ORG }}" \
--validate-from "${{ secrets.VCN_ORG }}" \
--validate-cache "${{ secrets.VCN_ORG }}" \
--generic ${{ needs.init.outputs.version }}
codenotary:
@@ -145,7 +144,7 @@ jobs:
steps:
- name: Checkout the repository
if: needs.init.outputs.publish == 'true'
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
@@ -171,7 +170,7 @@ jobs:
steps:
- name: Checkout the repository
if: needs.init.outputs.publish == 'true'
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Initialize git
if: needs.init.outputs.publish == 'true'
@@ -192,13 +191,14 @@ jobs:
run_supervisor:
runs-on: ubuntu-latest
name: Run the Supervisor
needs: ["build", "codenotary"]
needs: ["build", "codenotary", "init"]
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Build the Supervisor
uses: home-assistant/builder@2021.04.0
if: needs.init.outputs.publish != 'true'
uses: home-assistant/builder@2021.06.2
with:
args: |
--test \
@@ -206,6 +206,12 @@ jobs:
--target /data \
--generic runner
- name: Pull Supervisor
if: needs.init.outputs.publish == 'true'
run: |
docker pull homeassistant/amd64-hassio-supervisor:${{ needs.init.outputs.version }}
docker tag homeassistant/amd64-hassio-supervisor:${{ needs.init.outputs.version }} homeassistant/amd64-hassio-supervisor:runner
- name: Create the Supervisor
run: |
mkdir -p /tmp/supervisor/data
@@ -231,22 +237,63 @@ jobs:
SUPERVISOR=$(docker inspect --format='{{.NetworkSettings.IPAddress}}' hassio_supervisor)
ping="error"
while [ "$ping" != "ok" ]; do
ping=$(curl -sSL "http://$SUPERVISOR/supervisor/ping" | jq -r .result)
ping=$(curl -sSL "http://$SUPERVISOR/supervisor/ping" | jq -r '.result')
sleep 5
done
docker logs hassio_supervisor
- name: Check the Supervisor
run: |
echo "Checking supervisor info"
test=$(docker exec hassio_cli ha supervisor info --no-progress --raw-json | jq -r .result)
test=$(docker exec hassio_cli ha supervisor info --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
docker logs hassio_supervisor
exit 1
fi
echo "Checking supervisor network info"
test=$(docker exec hassio_cli ha network info --no-progress --raw-json | jq -r .result)
test=$(docker exec hassio_cli ha network info --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
docker logs hassio_supervisor
exit 1
fi
- name: Check the Store / Addon
run: |
echo "Install Core SSH Add-on"
test=$(docker exec hassio_cli ha addons install core_ssh --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
docker logs hassio_supervisor
exit 1
fi
echo "Start Core SSH Add-on"
test=$(docker exec hassio_cli ha addons start core_ssh --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
docker logs hassio_supervisor
exit 1
fi
- name: Check the Supervisor code sign
if: needs.init.outputs.publish == 'true'
run: |
echo "Enable Content-Trust"
test=$(docker exec hassio_cli ha supervisor options --content-trust=true --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
docker logs hassio_supervisor
exit 1
fi
echo "Run supervisor health check"
test=$(docker exec hassio_cli ha resolution healthcheck --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
docker logs hassio_supervisor
exit 1
fi
echo "Check supervisor unhealthy"
test=$(docker exec hassio_cli ha resolution info --no-progress --raw-json | jq -r '.data.unhealthy[]')
if [ "$test" != "" ];then
docker logs hassio_supervisor
exit 1
fi

View File

@@ -8,7 +8,7 @@ on:
pull_request: ~
env:
DEFAULT_PYTHON: 3.8
DEFAULT_PYTHON: 3.9
PRE_COMMIT_HOME: ~/.cache/pre-commit
jobs:
@@ -18,11 +18,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
name: Prepare Python ${{ matrix.python-version }} dependencies
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.2.2
@@ -30,7 +30,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -47,7 +47,7 @@ jobs:
pip install -r requirements.txt -r requirements_tests.txt
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
@@ -66,7 +66,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -74,7 +74,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -95,7 +95,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Register hadolint problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/hadolint.json"
@@ -110,7 +110,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -118,7 +118,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -130,7 +130,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
@@ -154,7 +154,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -162,7 +162,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -186,7 +186,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -194,7 +194,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -206,7 +206,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
@@ -227,7 +227,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -235,7 +235,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -247,7 +247,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
@@ -271,7 +271,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -279,7 +279,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -303,7 +303,7 @@ jobs:
needs: prepare
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -311,7 +311,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -323,7 +323,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
@@ -343,11 +343,11 @@ jobs:
needs: prepare
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
name: Run tests Python ${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.2
id: python
@@ -359,7 +359,7 @@ jobs:
bash <(curl https://getvcn.codenotary.com -L)
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -394,7 +394,7 @@ jobs:
-o console_output_style=count \
tests
- name: Upload coverage artifact
uses: actions/upload-artifact@v2.2.3
uses: actions/upload-artifact@v2.2.4
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
@@ -405,7 +405,7 @@ jobs:
needs: pytest
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
id: python
@@ -413,7 +413,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: venv
key: |
@@ -432,4 +432,4 @@ jobs:
coverage report
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.3.2
uses: codecov/codecov-action@v1.5.2

View File

@@ -11,7 +11,7 @@ jobs:
name: Release Drafter
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

View File

@@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
- name: Sentry Release
uses: getsentry/action-release@v1.1
uses: getsentry/action-release@v1.1.5
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}

View File

@@ -9,7 +9,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3.0.18
- uses: actions/stale@v3.0.19
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.6b0
hooks:
- id: black
args:

16
.vscode/tasks.json vendored
View File

@@ -4,7 +4,7 @@
{
"label": "Run Supervisor",
"type": "shell",
"command": "./scripts/run-supervisor.sh",
"command": "./scripts/supervisor.sh",
"group": {
"kind": "test",
"isDefault": true
@@ -15,20 +15,6 @@
},
"problemMatcher": []
},
{
"label": "Build Supervisor",
"type": "shell",
"command": "./scripts/build-supervisor.sh",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Run Supervisor CLI",
"type": "shell",

View File

@@ -2,17 +2,23 @@
"image": "homeassistant/{arch}-hassio-supervisor",
"shadow_repository": "ghcr.io/home-assistant",
"build_from": {
"aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.8-alpine3.13",
"armhf": "ghcr.io/home-assistant/armhf-base-python:3.8-alpine3.13",
"armv7": "ghcr.io/home-assistant/armv7-base-python:3.8-alpine3.13",
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.8-alpine3.13",
"i386": "ghcr.io/home-assistant/i386-base-python:3.8-alpine3.13"
"aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.9-alpine3.13",
"armhf": "ghcr.io/home-assistant/armhf-base-python:3.9-alpine3.13",
"armv7": "ghcr.io/home-assistant/armv7-base-python:3.9-alpine3.13",
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.9-alpine3.13",
"i386": "ghcr.io/home-assistant/i386-base-python:3.9-alpine3.13"
},
"args": {
"VCN_VERSION": "0.9.4"
},
"labels": {
"io.hass.type": "supervisor",
"org.opencontainers.image.source": "https://github.com/home-assistant/supervisor"
"org.opencontainers.image.title": "Home Assistant Supervisor",
"org.opencontainers.image.description": "Container-based system for managing Home Assistant Core installation",
"org.opencontainers.image.source": "https://github.com/home-assistant/supervisor",
"org.opencontainers.image.authors": "The Home Assistant Authors",
"org.opencontainers.image.url": "https://www.home-assistant.io/",
"org.opencontainers.image.documentation": "https://www.home-assistant.io/docs/",
"org.opencontainers.image.licenses": "Apache License 2.0"
}
}

View File

@@ -37,6 +37,7 @@ disable=
too-many-return-statements,
too-many-statements,
unused-argument,
consider-using-with
[EXCEPTIONS]
overgeneral-exceptions=Exception

View File

@@ -1,20 +1,20 @@
aiohttp==3.7.4.post0
async_timeout==3.0.1
atomicwrites==1.4.0
attrs==20.3.0
awesomeversion==21.4.0
brotli==1.0.9
attrs==21.2.0
awesomeversion==21.6.0
brotlipy==0.7.0
cchardet==2.1.7
colorlog==4.8.0
ciso8601==2.1.3
colorlog==5.0.1
cpe==1.2.1
cryptography==3.4.6
debugpy==1.2.1
debugpy==1.3.0
docker==5.0.0
gitpython==3.1.14
jinja2==2.11.3
pulsectl==21.3.4
pytz==2021.1
gitpython==3.1.18
jinja2==3.0.1
pulsectl==21.5.18
pyudev==0.22.0
ruamel.yaml==0.15.100
sentry-sdk==1.0.0
sentry-sdk==1.1.0
voluptuous==0.12.1

View File

@@ -1,14 +1,14 @@
black==20.8b1
black==21.6b0
codecov==2.1.11
coverage==5.5
flake8-docstrings==1.6.0
flake8==3.9.0
pre-commit==2.12.0
pydocstyle==6.0.0
pylint==2.7.4
flake8==3.9.2
pre-commit==2.13.0
pydocstyle==6.1.1
pylint==2.8.3
pytest-aiohttp==0.3.0
pytest-asyncio==0.12.0 # NB!: Versions over 0.12.0 breaks pytest-aiohttp (https://github.com/aio-libs/pytest-aiohttp/issues/16)
pytest-cov==2.11.1
pytest-cov==2.12.1
pytest-timeout==1.4.2
pytest==6.2.3
pyupgrade==2.12.0
pytest==6.2.4
pyupgrade==2.19.4

View File

@@ -1,28 +0,0 @@
#!/bin/bash
source "${BASH_SOURCE[0]%/*}/common.sh"
set -eE
DOCKER_TIMEOUT=30
DOCKER_PID=0
function build_supervisor() {
docker pull homeassistant/amd64-builder:dev
docker run --rm \
--privileged \
-v /run/docker.sock:/run/docker.sock \
-v "$(pwd):/data" \
homeassistant/amd64-builder:dev \
--generic latest \
--target /data \
--test \
--amd64 \
--no-cache
}
echo "Build Supervisor"
start_docker
trap "stop_docker" ERR
build_supervisor

View File

@@ -4,6 +4,9 @@ function start_docker() {
local starttime
local endtime
update-alternatives --set iptables /usr/sbin/iptables-legacy || echo "Fails adjust iptables"
update-alternatives --set ip6tables /usr/sbin/iptables-legacy || echo "Fails adjust ip6tables"
echo "Starting docker."
dockerd 2> /dev/null &
DOCKER_PID=$!

View File

@@ -1,12 +1,26 @@
#!/bin/bash
source "${BASH_SOURCE[0]%/*}/common.sh"
source "${BASH_SOURCE[0]%/*}/build-supervisor.sh"
set -eE
DOCKER_TIMEOUT=30
DOCKER_PID=0
function build_supervisor() {
docker pull homeassistant/amd64-builder:dev
docker run --rm \
--privileged \
-v /run/docker.sock:/run/docker.sock \
-v "$(pwd):/data" \
homeassistant/amd64-builder:dev \
--generic latest \
--target /data \
--test \
--amd64 \
--no-cache
}
function cleanup_docker() {
echo "Cleaning up stopped containers..."

View File

@@ -65,6 +65,7 @@ from ..utils import check_port
from ..utils.apparmor import adjust_profile
from ..utils.json import read_json_file, write_json_file
from ..utils.tar import atomic_contents_add, secure_path
from .const import SnapshotAddonMode
from .model import AddonModel, Data
from .options import AddonOptions
from .utils import remove_data
@@ -426,30 +427,20 @@ class Addon(AddonModel):
@property
def devices(self) -> Set[Device]:
"""Extract devices from add-on options."""
raw_schema = self.data[ATTR_SCHEMA]
if isinstance(raw_schema, bool) or not raw_schema:
return set()
# Validate devices
options_validator = AddonOptions(self.coresys, raw_schema, self.name, self.slug)
options_schema = self.schema
with suppress(vol.Invalid):
options_validator(self.options)
options_schema.validate(self.options)
return options_validator.devices
return options_schema.devices
@property
def pwned(self) -> Set[str]:
"""Extract pwned data for add-on options."""
raw_schema = self.data[ATTR_SCHEMA]
if isinstance(raw_schema, bool) or not raw_schema:
return set()
# Validate devices
options_validator = AddonOptions(self.coresys, raw_schema, self.name, self.slug)
options_schema = self.schema
with suppress(vol.Invalid):
options_validator(self.options)
options_schema.validate(self.options)
return options_validator.pwned
return options_schema.pwned
def save_persist(self) -> None:
"""Save data of add-on."""
@@ -463,7 +454,7 @@ class Addon(AddonModel):
application = RE_WATCHDOG.match(url)
# extract arguments
t_port = application.group("t_port")
t_port = int(application.group("t_port"))
t_proto = application.group("t_proto")
s_prefix = application.group("s_prefix") or ""
s_suffix = application.group("s_suffix") or ""
@@ -487,8 +478,8 @@ class Addon(AddonModel):
# Make HTTP request
try:
url = f"{proto}://{self.ip_address}:{port}{s_suffix}"
async with self.sys_websession_ssl.get(
url, timeout=WATCHDOG_TIMEOUT
async with self.sys_websession.get(
url, timeout=WATCHDOG_TIMEOUT, ssl=False
) as req:
if req.status < 300:
return True
@@ -503,7 +494,7 @@ class Addon(AddonModel):
await self.sys_homeassistant.secrets.reload()
try:
options = self.schema(self.options)
options = self.schema.validate(self.options)
write_json_file(self.path_options, options)
except vol.Invalid as ex:
_LOGGER.error(
@@ -688,8 +679,25 @@ class Addon(AddonModel):
except DockerError as err:
raise AddonsError() from err
async def _snapshot_command(self, command: str) -> None:
try:
command_return = await self.instance.run_inside(command)
if command_return.exit_code != 0:
_LOGGER.error(
"Pre-/Post-Snapshot command returned error code: %s",
command_return.exit_code,
)
raise AddonsError()
except DockerError as err:
_LOGGER.error(
"Failed running pre-/post-snapshot command %s: %s", command, err
)
raise AddonsError() from err
async def snapshot(self, tar_file: tarfile.TarFile) -> None:
"""Snapshot state of an add-on."""
is_running = await self.is_running()
with TemporaryDirectory(dir=self.sys_config.path_tmp) as temp:
temp_path = Path(temp)
@@ -739,12 +747,32 @@ class Addon(AddonModel):
arcname="data",
)
if (
is_running
and self.snapshot_mode == SnapshotAddonMode.HOT
and self.snapshot_pre is not None
):
await self._snapshot_command(self.snapshot_pre)
elif is_running and self.snapshot_mode == SnapshotAddonMode.COLD:
_LOGGER.info("Shutdown add-on %s for cold snapshot", self.slug)
await self.instance.stop()
try:
_LOGGER.info("Building snapshot for add-on %s", self.slug)
await self.sys_run_in_executor(_write_tarfile)
except (tarfile.TarError, OSError) as err:
_LOGGER.error("Can't write tarfile %s: %s", tar_file, err)
raise AddonsError() from err
finally:
if (
is_running
and self.snapshot_mode == SnapshotAddonMode.HOT
and self.snapshot_post is not None
):
await self._snapshot_command(self.snapshot_post)
elif is_running and self.snapshot_mode is SnapshotAddonMode.COLD:
_LOGGER.info("Starting add-on %s again", self.slug)
await self.start()
_LOGGER.info("Finish snapshot for addon %s", self.slug)

View File

@@ -9,6 +9,7 @@ from awesomeversion import AwesomeVersion
from ..const import (
ATTR_ARGS,
ATTR_BUILD_FROM,
ATTR_LABELS,
ATTR_SQUASH,
FILE_SUFFIX_CONFIGURATION,
META_ADDON,
@@ -46,9 +47,12 @@ class AddonBuild(FileConfiguration, CoreSysAttributes):
@property
def base_image(self) -> str:
"""Return base image for this add-on."""
return self._data[ATTR_BUILD_FROM].get(
self.sys_arch.default, f"homeassistant/{self.sys_arch.default}-base:latest"
)
if not self._data[ATTR_BUILD_FROM]:
return f"ghcr.io/home-assistant/{self.sys_arch.default}-base:latest"
# Evaluate correct base image
arch = self.sys_arch.match(list(self._data[ATTR_BUILD_FROM].keys()))
return self._data[ATTR_BUILD_FROM][arch]
@property
def squash(self) -> bool:
@@ -60,6 +64,11 @@ class AddonBuild(FileConfiguration, CoreSysAttributes):
"""Return additional Docker build arguments."""
return self._data[ATTR_ARGS]
@property
def additional_labels(self) -> Dict[str, str]:
"""Return additional Docker labels."""
return self._data[ATTR_LABELS]
@property
def is_valid(self) -> bool:
"""Return true if the build env is valid."""
@@ -76,7 +85,7 @@ class AddonBuild(FileConfiguration, CoreSysAttributes):
"path": str(self.addon.path_location),
"tag": f"{self.addon.image}:{version!s}",
"pull": True,
"forcerm": True,
"forcerm": not self.sys_dev,
"squash": self.squash,
"labels": {
"io.hass.version": version,
@@ -84,6 +93,7 @@ class AddonBuild(FileConfiguration, CoreSysAttributes):
"io.hass.type": META_ADDON,
"io.hass.name": self._fix_label("name"),
"io.hass.description": self._fix_label("description"),
**self.additional_labels,
},
"buildargs": {
"BUILD_FROM": self.base_image,

View File

@@ -0,0 +1,12 @@
"""Add-on static data."""
from enum import Enum
class SnapshotAddonMode(str, Enum):
"""Snapshot mode of an Add-on."""
HOT = "hot"
COLD = "cold"
ATTR_SNAPSHOT = "snapshot"

View File

@@ -4,7 +4,8 @@ from pathlib import Path
from typing import Any, Awaitable, Dict, List, Optional
from awesomeversion import AwesomeVersion, AwesomeVersionException
import voluptuous as vol
from supervisor.addons.const import SnapshotAddonMode
from ..const import (
ATTR_ADVANCED,
@@ -52,6 +53,8 @@ from ..const import (
ATTR_SERVICES,
ATTR_SLUG,
ATTR_SNAPSHOT_EXCLUDE,
ATTR_SNAPSHOT_POST,
ATTR_SNAPSHOT_PRE,
ATTR_STAGE,
ATTR_STARTUP,
ATTR_STDIN,
@@ -75,6 +78,7 @@ from ..const import (
)
from ..coresys import CoreSys, CoreSysAttributes
from ..docker.const import Capabilities
from .const import ATTR_SNAPSHOT
from .options import AddonOptions, UiOptions
from .validate import RE_SERVICE, RE_VOLUME
@@ -359,6 +363,21 @@ class AddonModel(CoreSysAttributes, ABC):
"""Return Exclude list for snapshot."""
return self.data.get(ATTR_SNAPSHOT_EXCLUDE, [])
@property
def snapshot_pre(self) -> Optional[str]:
"""Return pre-snapshot command."""
return self.data.get(ATTR_SNAPSHOT_PRE)
@property
def snapshot_post(self) -> Optional[str]:
"""Return post-snapshot command."""
return self.data.get(ATTR_SNAPSHOT_POST)
@property
def snapshot_mode(self) -> SnapshotAddonMode:
"""Return if snapshot is hot/cold."""
return self.data[ATTR_SNAPSHOT]
@property
def default_init(self) -> bool:
"""Return True if the add-on have no own init."""
@@ -532,18 +551,16 @@ class AddonModel(CoreSysAttributes, ABC):
return Path(self.path_location, "apparmor.txt")
@property
def schema(self) -> vol.Schema:
"""Create a schema for add-on options."""
def schema(self) -> AddonOptions:
"""Return Addon options validation object."""
raw_schema = self.data[ATTR_SCHEMA]
if isinstance(raw_schema, bool):
raw_schema = {}
return vol.Schema(
vol.All(dict, AddonOptions(self.coresys, raw_schema, self.name, self.slug))
)
return AddonOptions(self.coresys, raw_schema, self.name, self.slug)
@property
def schema_ui(self) -> Optional[List[Dict[str, Any]]]:
def schema_ui(self) -> Optional[List[Dict[any, any]]]:
"""Create a UI schema for add-on options."""
raw_schema = self.data[ATTR_SCHEMA]

View File

@@ -69,6 +69,11 @@ class AddonOptions(CoreSysAttributes):
self._name = name
self._slug = slug
@property
def validate(self) -> vol.Schema:
"""Create a schema for add-on options."""
return vol.Schema(vol.All(dict, self))
def __call__(self, struct):
"""Create schema validator for add-ons options."""
options = {}

View File

@@ -7,6 +7,8 @@ import uuid
import voluptuous as vol
from supervisor.addons.const import SnapshotAddonMode
from ..const import (
ARCH_ALL,
ATTR_ACCESS_TOKEN,
@@ -47,6 +49,7 @@ from ..const import (
ATTR_INIT,
ATTR_JOURNALD,
ATTR_KERNEL_MODULES,
ATTR_LABELS,
ATTR_LEGACY,
ATTR_LOCATON,
ATTR_MACHINE,
@@ -67,6 +70,8 @@ from ..const import (
ATTR_SERVICES,
ATTR_SLUG,
ATTR_SNAPSHOT_EXCLUDE,
ATTR_SNAPSHOT_POST,
ATTR_SNAPSHOT_PRE,
ATTR_SQUASH,
ATTR_STAGE,
ATTR_STARTUP,
@@ -104,6 +109,7 @@ from ..validate import (
uuid_match,
version_tag,
)
from .const import ATTR_SNAPSHOT
from .options import RE_SCHEMA_ELEMENT
_LOGGER: logging.Logger = logging.getLogger(__name__)
@@ -121,6 +127,7 @@ SCHEMA_ELEMENT = vol.Match(RE_SCHEMA_ELEMENT)
RE_MACHINE = re.compile(
r"^!?(?:"
r"|intel-nuc"
r"|generic-x86-64"
r"|odroid-c2"
r"|odroid-c4"
r"|odroid-n2"
@@ -157,6 +164,14 @@ def _warn_addon_config(config: Dict[str, Any]):
name,
)
if config.get(ATTR_SNAPSHOT, SnapshotAddonMode.HOT) == SnapshotAddonMode.COLD and (
config.get(ATTR_SNAPSHOT_POST) or config.get(ATTR_SNAPSHOT_PRE)
):
_LOGGER.warning(
"Add-on which only support COLD backups trying to use post/pre commands. Please report this to the maintainer of %s",
name,
)
return config
@@ -278,6 +293,11 @@ _SCHEMA_ADDON_CONFIG = vol.Schema(
vol.Optional(ATTR_SERVICES): [vol.Match(RE_SERVICE)],
vol.Optional(ATTR_DISCOVERY): [valid_discovery_service],
vol.Optional(ATTR_SNAPSHOT_EXCLUDE): [str],
vol.Optional(ATTR_SNAPSHOT_PRE): str,
vol.Optional(ATTR_SNAPSHOT_POST): str,
vol.Optional(ATTR_SNAPSHOT, default=SnapshotAddonMode.HOT): vol.Coerce(
SnapshotAddonMode
),
vol.Optional(ATTR_OPTIONS, default={}): dict,
vol.Optional(ATTR_SCHEMA, default={}): vol.Any(
vol.Schema(
@@ -317,9 +337,8 @@ SCHEMA_BUILD_CONFIG = vol.Schema(
{vol.In(ARCH_ALL): vol.Match(RE_DOCKER_IMAGE_BUILD)}
),
vol.Optional(ATTR_SQUASH, default=False): vol.Boolean(),
vol.Optional(ATTR_ARGS, default=dict): vol.Schema(
{vol.Coerce(str): vol.Coerce(str)}
),
vol.Optional(ATTR_ARGS, default=dict): vol.Schema({str: str}),
vol.Optional(ATTR_LABELS, default=dict): vol.Schema({str: str}),
},
extra=vol.REMOVE_EXTRA,
)

View File

@@ -19,13 +19,14 @@ from .host import APIHost
from .info import APIInfo
from .ingress import APIIngress
from .jobs import APIJobs
from .middleware.security import SecurityMiddleware
from .multicast import APIMulticast
from .network import APINetwork
from .observer import APIObserver
from .os import APIOS
from .proxy import APIProxy
from .resolution import APIResoulution
from .security import SecurityMiddleware
from .security import APISecurity
from .services import APIServices
from .snapshots import APISnapshots
from .store import APIStore
@@ -82,6 +83,7 @@ class RestAPI(CoreSysAttributes):
self._register_snapshots()
self._register_supervisor()
self._register_store()
self._register_security()
await self.start()
@@ -146,6 +148,18 @@ class RestAPI(CoreSysAttributes):
]
)
def _register_security(self) -> None:
"""Register Security functions."""
api_security = APISecurity()
api_security.coresys = self.coresys
self.webapp.add_routes(
[
web.get("/security/info", api_security.info),
web.post("/security/options", api_security.options),
]
)
def _register_jobs(self) -> None:
"""Register Jobs functions."""
api_jobs = APIJobs()
@@ -209,7 +223,6 @@ class RestAPI(CoreSysAttributes):
[
web.get("/hardware/info", api_hardware.info),
web.get("/hardware/audio", api_hardware.audio),
web.post("/hardware/trigger", api_hardware.trigger),
]
)

View File

@@ -71,6 +71,7 @@ from ..const import (
ATTR_OPTIONS,
ATTR_PRIVILEGED,
ATTR_PROTECTED,
ATTR_PWNED,
ATTR_RATING,
ATTR_REPOSITORIES,
ATTR_REPOSITORY,
@@ -104,9 +105,8 @@ from ..const import (
from ..coresys import CoreSysAttributes
from ..docker.stats import DockerStats
from ..exceptions import APIError, APIForbidden, PwnedError, PwnedSecret
from ..utils.pwned import check_pwned_password
from ..validate import docker_ports
from .utils import api_process, api_process_raw, api_validate
from .utils import api_process, api_process_raw, api_validate, json_loads
_LOGGER: logging.Logger = logging.getLogger(__name__)
@@ -338,30 +338,38 @@ class APIAddons(CoreSysAttributes):
async def options_validate(self, request: web.Request) -> None:
"""Validate user options for add-on."""
addon = self._extract_addon_installed(request)
data = {ATTR_MESSAGE: "", ATTR_VALID: True}
data = {ATTR_MESSAGE: "", ATTR_VALID: True, ATTR_PWNED: False}
options = await request.json(loads=json_loads) or addon.options
# Validate config
options_schema = addon.schema
try:
addon.schema(addon.options)
options_schema.validate(options)
except vol.Invalid as ex:
data[ATTR_MESSAGE] = humanize_error(addon.options, ex)
data[ATTR_MESSAGE] = humanize_error(options, ex)
data[ATTR_VALID] = False
# Validate security
if self.sys_config.force_security:
for secret in addon.pwned:
try:
await check_pwned_password(self.sys_websession, secret)
continue
except PwnedSecret:
data[ATTR_MESSAGE] = "Add-on use pwned secrets!"
except PwnedError as err:
data[
ATTR_MESSAGE
] = f"Error happening on pwned secrets check: {err!s}!"
if not self.sys_security.pwned:
return data
data[ATTR_VALID] = False
break
# Pwned check
for secret in options_schema.pwned:
try:
await self.sys_security.verify_secret(secret)
continue
except PwnedSecret:
data[ATTR_PWNED] = True
except PwnedError:
data[ATTR_PWNED] = None
break
if self.sys_security.force and data[ATTR_PWNED] in (None, True):
data[ATTR_VALID] = False
if data[ATTR_PWNED] is None:
data[ATTR_MESSAGE] = "Error happening on pwned secrets check!"
else:
data[ATTR_MESSAGE] = "Add-on uses pwned secrets!"
return data
@@ -374,7 +382,7 @@ class APIAddons(CoreSysAttributes):
addon = self._extract_addon_installed(request)
try:
return addon.schema(addon.options)
return addon.schema.validate(addon.options)
except vol.Invalid:
raise APIError("Invalid configuration data for the add-on") from None

6
supervisor/api/const.py Normal file
View File

@@ -0,0 +1,6 @@
"""Const for API."""
ATTR_USE_RTC = "use_rtc"
ATTR_USE_NTP = "use_ntp"
ATTR_DT_UTC = "dt_utc"
ATTR_DT_SYNCHRONIZED = "dt_synchronized"

View File

@@ -1,6 +1,6 @@
"""Init file for Supervisor hardware RESTful API."""
import logging
from typing import Any, Awaitable, Dict
from typing import Any, Dict
from aiohttp import web
@@ -58,8 +58,3 @@ class APIHardware(CoreSysAttributes):
},
}
}
@api_process
async def trigger(self, request: web.Request) -> Awaitable[None]:
"""Trigger a udev device reload."""
_LOGGER.debug("Ignoring DEPRECATED hardware trigger function call.")

View File

@@ -21,9 +21,11 @@ from ..const import (
ATTR_OPERATING_SYSTEM,
ATTR_SERVICES,
ATTR_STATE,
ATTR_TIMEZONE,
CONTENT_TYPE_BINARY,
)
from ..coresys import CoreSysAttributes
from .const import ATTR_DT_SYNCHRONIZED, ATTR_DT_UTC, ATTR_USE_NTP, ATTR_USE_RTC
from .utils import api_process, api_process_raw, api_validate
SERVICE = "service"
@@ -49,6 +51,11 @@ class APIHost(CoreSysAttributes):
ATTR_HOSTNAME: self.sys_host.info.hostname,
ATTR_KERNEL: self.sys_host.info.kernel,
ATTR_OPERATING_SYSTEM: self.sys_host.info.operating_system,
ATTR_TIMEZONE: self.sys_host.info.timezone,
ATTR_DT_UTC: self.sys_host.info.dt_utc,
ATTR_DT_SYNCHRONIZED: self.sys_host.info.dt_synchronized,
ATTR_USE_NTP: self.sys_host.info.use_ntp,
ATTR_USE_RTC: self.sys_host.info.use_rtc,
}
@api_process

View File

@@ -48,5 +48,5 @@ class APIInfo(CoreSysAttributes):
ATTR_SUPPORTED: self.sys_core.supported,
ATTR_CHANNEL: self.sys_updater.channel,
ATTR_LOGGING: self.sys_config.logging,
ATTR_TIMEZONE: self.sys_config.timezone,
ATTR_TIMEZONE: self.sys_timezone,
}

View File

@@ -0,0 +1 @@
"""API middleware for aiohttp."""

View File

@@ -0,0 +1,206 @@
"""Handle security part of this API."""
import logging
import re
from aiohttp.web import Request, RequestHandler, Response, middleware
from aiohttp.web_exceptions import HTTPForbidden, HTTPUnauthorized
from ...const import (
REQUEST_FROM,
ROLE_ADMIN,
ROLE_BACKUP,
ROLE_DEFAULT,
ROLE_HOMEASSISTANT,
ROLE_MANAGER,
CoreState,
)
from ...coresys import CoreSys, CoreSysAttributes
from ..utils import api_return_error, excract_supervisor_token
_LOGGER: logging.Logger = logging.getLogger(__name__)
# fmt: off
# Block Anytime
BLACKLIST = re.compile(
r"^(?:"
r"|/homeassistant/api/hassio/.*"
r"|/core/api/hassio/.*"
r")$"
)
# Free to call or have own security concepts
NO_SECURITY_CHECK = re.compile(
r"^(?:"
r"|/homeassistant/api/.*"
r"|/homeassistant/websocket"
r"|/core/api/.*"
r"|/core/websocket"
r"|/supervisor/ping"
r")$"
)
# Observer allow API calls
OBSERVER_CHECK = re.compile(
r"^(?:"
r"|/.+/info"
r")$"
)
# Can called by every add-on
ADDONS_API_BYPASS = re.compile(
r"^(?:"
r"|/addons/self/(?!security|update)[^/]+"
r"|/addons/self/options/config"
r"|/info"
r"|/services.*"
r"|/discovery.*"
r"|/auth"
r")$"
)
# Policy role add-on API access
ADDONS_ROLE_ACCESS = {
ROLE_DEFAULT: re.compile(
r"^(?:"
r"|/.+/info"
r")$"
),
ROLE_HOMEASSISTANT: re.compile(
r"^(?:"
r"|/.+/info"
r"|/core/.+"
r"|/homeassistant/.+"
r")$"
),
ROLE_BACKUP: re.compile(
r"^(?:"
r"|/.+/info"
r"|/snapshots.*"
r")$"
),
ROLE_MANAGER: re.compile(
r"^(?:"
r"|/.+/info"
r"|/addons(?:/[^/]+/(?!security).+|/reload)?"
r"|/audio/.+"
r"|/auth/cache"
r"|/cli/.+"
r"|/core/.+"
r"|/dns/.+"
r"|/docker/.+"
r"|/jobs/.+"
r"|/hardware/.+"
r"|/hassos/.+"
r"|/homeassistant/.+"
r"|/host/.+"
r"|/multicast/.+"
r"|/network/.+"
r"|/observer/.+"
r"|/os/.+"
r"|/resolution/.+"
r"|/snapshots.*"
r"|/store.*"
r"|/supervisor/.+"
r"|/security/.+"
r")$"
),
ROLE_ADMIN: re.compile(
r".*"
),
}
# fmt: on
class SecurityMiddleware(CoreSysAttributes):
"""Security middleware functions."""
def __init__(self, coresys: CoreSys):
"""Initialize security middleware."""
self.coresys: CoreSys = coresys
@middleware
async def system_validation(
self, request: Request, handler: RequestHandler
) -> Response:
"""Check if core is ready to response."""
if self.sys_core.state not in (
CoreState.STARTUP,
CoreState.RUNNING,
CoreState.FREEZE,
):
return api_return_error(
message=f"System is not ready with state: {self.sys_core.state.value}"
)
return await handler(request)
@middleware
async def token_validation(
self, request: Request, handler: RequestHandler
) -> Response:
"""Check security access of this layer."""
request_from = None
supervisor_token = excract_supervisor_token(request)
# Blacklist
if BLACKLIST.match(request.path):
_LOGGER.error("%s is blacklisted!", request.path)
raise HTTPForbidden()
# Ignore security check
if NO_SECURITY_CHECK.match(request.path):
_LOGGER.debug("Passthrough %s", request.path)
return await handler(request)
# Not token
if not supervisor_token:
_LOGGER.warning("No API token provided for %s", request.path)
raise HTTPUnauthorized()
# Home-Assistant
if supervisor_token == self.sys_homeassistant.supervisor_token:
_LOGGER.debug("%s access from Home Assistant", request.path)
request_from = self.sys_homeassistant
# Host
if supervisor_token == self.sys_plugins.cli.supervisor_token:
_LOGGER.debug("%s access from Host", request.path)
request_from = self.sys_host
# Observer
if supervisor_token == self.sys_plugins.observer.supervisor_token:
if not OBSERVER_CHECK.match(request.url):
_LOGGER.warning("%s invalid Observer access", request.path)
raise HTTPForbidden()
_LOGGER.debug("%s access from Observer", request.path)
request_from = self.sys_plugins.observer
# Add-on
addon = None
if supervisor_token and not request_from:
addon = self.sys_addons.from_token(supervisor_token)
# Check Add-on API access
if addon and ADDONS_API_BYPASS.match(request.path):
_LOGGER.debug("Passthrough %s from %s", request.path, addon.slug)
request_from = addon
elif addon and addon.access_hassio_api:
# Check Role
if ADDONS_ROLE_ACCESS[addon.hassio_role].match(request.path):
_LOGGER.info("%s access from %s", request.path, addon.slug)
request_from = addon
else:
_LOGGER.warning("%s no role for %s", request.path, addon.slug)
elif addon:
_LOGGER.warning(
"%s missing API permission for %s", addon.slug, request.path
)
if request_from:
request[REQUEST_FROM] = request_from
return await handler(request)
_LOGGER.error("Invalid token for access %s", request.path)
raise HTTPForbidden()

View File

@@ -1,9 +1,9 @@
try {
new Function("import('/api/hassio/app/frontend_latest/entrypoint.4050b348.js')")();
new Function("import('/api/hassio/app/frontend_latest/entrypoint.0d3c68f7.js')")();
} catch (err) {
var el = document.createElement('script');
el.src = '/api/hassio/app/frontend_es5/entrypoint.bcf8e8ff.js';
el.src = '/api/hassio/app/frontend_es5/entrypoint.9e377d5a.js';
document.body.appendChild(el);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.022ea7e862bfe9729114.js","sources":["webpack://home-assistant-frontend/chunk.022ea7e862bfe9729114.js"],"mappings":"AAAA","sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[534],{68441:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=new WeakMap;t.default=function(e){var t=l.get(e);return t||(t=Object.create(null),l.set(e,t)),t}},78643:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PluralRules=void 0;var a=l(87480),n=l(43965),r=a.__importDefault(l(68441));function o(e,t){if(!(e instanceof u))throw new TypeError("Method Intl.PluralRules.prototype."+t+" called on incompatible receiver "+String(e))}function i(e,t,l,a){var n=a.IntegerDigits,r=a.NumberOfFractionDigits,o=a.FractionDigits;return u.localeData[e].fn(r?n+"."+o:n,"ordinal"===t)}var u=function(){function e(t,l){if(!(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Intl.PluralRules must be called with 'new'");return n.InitializePluralRules(this,t,l,{availableLocales:e.availableLocales,relevantExtensionKeys:e.relevantExtensionKeys,localeData:e.localeData,getDefaultLocale:e.getDefaultLocale,getInternalSlots:r.default})}return e.prototype.resolvedOptions=function(){o(this,"resolvedOptions");var t=Object.create(null),l=r.default(this);return t.locale=l.locale,t.type=l.type,["minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"].forEach((function(e){var a=l[e];void 0!==a&&(t[e]=a)})),t.pluralCategories=a.__spreadArray([],e.localeData[t.locale].categories[t.type]),t},e.prototype.select=function(e){o(this,"select");var t=n.ToNumber(e);return n.ResolvePlural(this,t,{getInternalSlots:r.default,PluralRuleSelect:i})},e.prototype.toString=function(){return"[object Intl.PluralRules]"},e.supportedLocalesOf=function(t,l){return n.SupportedLocales(e.availableLocales,n.CanonicalizeLocaleList(t),l)},e.__addLocaleData=function(){for(var t=[],l=0;l<arguments.length;l++)t[l]=arguments[l];for(var a=0,n=t;a<n.length;a++){var r=n[a],o=r.data,i=r.locale;e.localeData[i]=o,e.availableLocales.add(i),e.__defaultLocale||(e.__defaultLocale=i)}},e.getDefaultLocale=function(){return e.__defaultLocale},e.localeData={},e.availableLocales=new Set,e.__defaultLocale="",e.relevantExtensionKeys=[],e.polyfilled=!0,e}();t.PluralRules=u;try{"undefined"!=typeof Symbol&&Object.defineProperty(u.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,enumerable:!1,configurable:!0});try{Object.defineProperty(u,"length",{value:0,writable:!1,enumerable:!1,configurable:!0})}catch(c){}Object.defineProperty(u.prototype.constructor,"length",{value:0,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(u.supportedLocalesOf,"length",{value:1,writable:!1,enumerable:!1,configurable:!0})}catch(s){}},25534:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=l(78643);l(27815).shouldPolyfill()&&Object.defineProperty(Intl,"PluralRules",{value:a.PluralRules,writable:!0,enumerable:!1,configurable:!0})},27815:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldPolyfill=void 0,t.shouldPolyfill=function(){return"undefined"==typeof Intl||!("PluralRules"in Intl)||"one"===new Intl.PluralRules("en",{minimumFractionDigits:2}).select(1)}}}]);
//# sourceMappingURL=chunk.1000be27cd087c21fa92.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.1000be27cd087c21fa92.js","sources":["webpack://home-assistant-frontend/chunk.1000be27cd087c21fa92.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.1274df0d4f9b61110840.js","sources":["webpack://home-assistant-frontend/chunk.1274df0d4f9b61110840.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.144785285e77c1827c0e.js","sources":["webpack://home-assistant-frontend/chunk.144785285e77c1827c0e.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.180b0a3f7ae5fc62f9e4.js","sources":["webpack://home-assistant-frontend/chunk.180b0a3f7ae5fc62f9e4.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.1c11636c7973052c4d31.js","sources":["webpack://home-assistant-frontend/chunk.1c11636c7973052c4d31.js"],"mappings":"AAAA","sourceRoot":""}

View File

@@ -0,0 +1,2 @@
!function(){"use strict";var r,t={5425:function(r,t,e){var n=e(91107);e(58556);function o(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=r&&("undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"]);if(null==e)return;var n,o,i=[],u=!0,a=!1;try{for(e=e.call(r);!(u=(n=e.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(f){a=!0,o=f}finally{try{u||null==e.return||e.return()}finally{if(a)throw o}}return i}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(r,t)}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var u={filterData:function(r,t,e){return e=e.toUpperCase(),r.filter((function(r){return Object.entries(t).some((function(t){var n=o(t,2),i=n[0],u=n[1];return!(!u.filterable||!String(u.filterKey?r[i][u.filterKey]:r[i]).toUpperCase().includes(e))}))}))},sortData:function(r,t,e,n){return r.sort((function(r,o){var i=1;"desc"===e&&(i=-1);var u=t.filterKey?r[n][t.filterKey]:r[n],a=t.filterKey?o[n][t.filterKey]:o[n];return"string"==typeof u&&(u=u.toUpperCase()),"string"==typeof a&&(a=a.toUpperCase()),void 0===u&&void 0!==a?1:void 0===a&&void 0!==u?-1:u<a?-1*i:u>a?1*i:0}))}};(0,n.Jj)(u)}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.m=t,n.x=function(){return n(5425)},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,{a:t}),t},n.d=function(r,t){for(var e in t)n.o(t,e)&&!n.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},n.f={},n.e=function(r){return Promise.all(Object.keys(n.f).reduce((function(t,e){return n.f[e](r,t),t}),[]))},n.u=function(r){return"chunk.aa4c3f9e4936a956fbc9.js"},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},r=n.x,n.x=function(){return n.e(354).then(r)},n.p="/api/hassio/app/frontend_es5/",function(){var r={425:1,477:1};n.f.i=function(t,e){r[t]||importScripts(""+n.u(t))};var t=self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[],e=t.push.bind(t);t.push=function(t){var o=t[0],i=t[1],u=t[2];for(var a in i)n.o(i,a)&&(n.m[a]=i[a]);for(u&&u(n);o.length;)r[o.pop()]=1;e(t)}}();n.x()}();
//# sourceMappingURL=chunk.232ece16c0cd5fc459b7.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.232ece16c0cd5fc459b7.js","sources":["webpack://home-assistant-frontend/chunk.232ece16c0cd5fc459b7.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.23709353009814f6ec3d.js","sources":["webpack://home-assistant-frontend/chunk.23709353009814f6ec3d.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.28ab065538efa89db557.js","sources":["webpack://home-assistant-frontend/chunk.28ab065538efa89db557.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.2e5192dd0552c13e5623.js","sources":["webpack://home-assistant-frontend/chunk.2e5192dd0552c13e5623.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.36c614645dd4e17cedb3.js","sources":["webpack://home-assistant-frontend/chunk.36c614645dd4e17cedb3.js"],"mappings":"AAAA","sourceRoot":""}

View File

@@ -0,0 +1,2 @@
!function(){"use strict";var r,t={5425:function(r,t,e){var n=e(91107);e(58556);function o(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=r&&("undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"]);if(null==e)return;var n,o,i=[],u=!0,a=!1;try{for(e=e.call(r);!(u=(n=e.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(f){a=!0,o=f}finally{try{u||null==e.return||e.return()}finally{if(a)throw o}}return i}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(r,t)}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var u={filterData:function(r,t,e){return e=e.toUpperCase(),r.filter((function(r){return Object.entries(t).some((function(t){var n=o(t,2),i=n[0],u=n[1];return!(!u.filterable||!String(u.filterKey?r[i][u.filterKey]:r[i]).toUpperCase().includes(e))}))}))},sortData:function(r,t,e,n){return r.sort((function(r,o){var i=1;"desc"===e&&(i=-1);var u=t.filterKey?r[n][t.filterKey]:r[n],a=t.filterKey?o[n][t.filterKey]:o[n];return"string"==typeof u&&(u=u.toUpperCase()),"string"==typeof a&&(a=a.toUpperCase()),void 0===u&&void 0!==a?1:void 0===a&&void 0!==u?-1:u<a?-1*i:u>a?1*i:0}))}};(0,n.Jj)(u)}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.m=t,n.x=function(){return n(5425)},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,{a:t}),t},n.d=function(r,t){for(var e in t)n.o(t,e)&&!n.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},n.f={},n.e=function(r){return Promise.all(Object.keys(n.f).reduce((function(t,e){return n.f[e](r,t),t}),[]))},n.u=function(r){return"chunk.aa4c3f9e4936a956fbc9.js"},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},r=n.x,n.x=function(){return n.e(354).then(r)},n.p="/api/hassio/app/frontend_es5/",function(){var r={477:1,425:1};n.f.i=function(t,e){r[t]||importScripts(""+n.u(t))};var t=self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[],e=t.push.bind(t);t.push=function(t){var o=t[0],i=t[1],u=t[2];for(var a in i)n.o(i,a)&&(n.m[a]=i[a]);for(u&&u(n);o.length;)r[o.pop()]=1;e(t)}}();n.x()}();
//# sourceMappingURL=chunk.38bf45e75c5f9e1064ab.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.38bf45e75c5f9e1064ab.js","sources":["webpack://home-assistant-frontend/chunk.38bf45e75c5f9e1064ab.js"],"mappings":"AAAA","sourceRoot":""}

View File

@@ -0,0 +1,2 @@
!function(){"use strict";var n,t={14971:function(n,t,e){var r,o,i=e(91107),a=e(9902),u=e.n(a),f=(e(58556),e(62173)),s={renderMarkdown:function(n,t){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r||(r=Object.assign({},(0,f.getDefaultWhiteList)(),{"ha-icon":["icon"],"ha-svg-icon":["path"]})),i.allowSvg?(o||(o=Object.assign({},r,{svg:["xmlns","height","width"],path:["transform","stroke","d"],img:["src"]})),e=o):e=r,(0,f.filterXSS)(u()(n,t),{whiteList:e})}};(0,i.Jj)(s)}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.m=t,r.x=function(){return r(14971)},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,{a:t}),t},r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.f={},r.e=function(n){return Promise.all(Object.keys(r.f).reduce((function(t,e){return r.f[e](n,t),t}),[]))},r.u=function(n){return"chunk."+{354:"aa4c3f9e4936a956fbc9",468:"b9d30baa8281f2ef1718"}[n]+".js"},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},n=r.x,r.x=function(){return Promise.all([r.e(354),r.e(468)]).then(n)},r.p="/api/hassio/app/frontend_es5/",function(){var n={971:1};r.f.i=function(t,e){n[t]||importScripts(""+r.u(t))};var t=self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[],e=t.push.bind(t);t.push=function(t){var o=t[0],i=t[1],a=t[2];for(var u in i)r.o(i,u)&&(r.m[u]=i[u]);for(a&&a(r);o.length;)n[o.pop()]=1;e(t)}}();r.x()}();
//# sourceMappingURL=chunk.390a8f1bf0c6addf0c23.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.390a8f1bf0c6addf0c23.js","sources":["webpack://home-assistant-frontend/chunk.390a8f1bf0c6addf0c23.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1,10 +0,0 @@
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.3a2a2f6b4ddd0c4883f8.js","sources":["webpack://home-assistant-frontend/chunk.3a2a2f6b4ddd0c4883f8.js"],"mappings":";AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.3a76f0ea2b0888f970db.js","sources":["webpack://home-assistant-frontend/chunk.3a76f0ea2b0888f970db.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.3c156057c501c13568ee.js","sources":["webpack://home-assistant-frontend/chunk.3c156057c501c13568ee.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.480c85c27dcb0da9fc2a.js","sources":["webpack://home-assistant-frontend/chunk.480c85c27dcb0da9fc2a.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.4e6beec37a57a13ae7aa.js","sources":["webpack://home-assistant-frontend/chunk.4e6beec37a57a13ae7aa.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"chunk.518d842c726558a1ee3d.js","sources":["webpack://home-assistant-frontend/chunk.518d842c726558a1ee3d.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.555bab815b35ce22d731.js","sources":["webpack://home-assistant-frontend/chunk.555bab815b35ce22d731.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +0,0 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

View File

@@ -1 +0,0 @@
{"version":3,"file":"chunk.69339833f81fc6a02f8b.js","sources":["webpack://home-assistant-frontend/chunk.69339833f81fc6a02f8b.js"],"mappings":";AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More