git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #162529 from mweinelt/home-assistant
commitcf805d3b9e650aeafe6fedbad1e6872d61972298 authorMartin Weinelt <mweinelt@users.noreply.github.com> dateSat 5 Mar 2022, 02:58 (5 years ago) parentb41d1afa253e17
23 files changed+272−98
nixos/tests/home-assistant.nix−43 pkgs/development/python-modules/aiodiscover/default.nix+2−2 pkgs/development/python-modules/aiohomekit/default.nix+4−2 pkgs/development/python-modules/aiohue/default.nix+2−2 pkgs/development/python-modules/aiopvpc/default.nix+5 pkgs/development/python-modules/aioshelly/default.nix+2−2 pkgs/development/python-modules/asyncsleepiq/default.nix+33 pkgs/development/python-modules/elkm1-lib/default.nix+2−11 pkgs/development/python-modules/gridnet/default.nix+57 pkgs/development/python-modules/hass-nabucasa/default.nix+4−2 pkgs/development/python-modules/holidays/default.nix+2−2 pkgs/development/python-modules/pydeconz/default.nix+2−2 pkgs/development/python-modules/pyefergy/default.nix+13−5 pkgs/development/python-modules/pynina/default.nix+2−2 pkgs/development/python-modules/radios/default.nix+67 pkgs/development/python-modules/snitun/default.nix+2−2 pkgs/development/python-modules/zha-quirks/default.nix+2−2 pkgs/development/python-modules/zwave-js-server-python/default.nix+6−2 pkgs/servers/home-assistant/component-packages.nix+22−12 pkgs/servers/home-assistant/default.nix+24−2 pkgs/servers/home-assistant/frontend.nix+2−2 pkgs/servers/home-assistant/tests.nix+11−1 pkgs/top-level/python-packages.nix+6
nixos/tests/home-assistant.nix−43
@@ -2,8 +2,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
22
33let
44 configDir = "/var/lib/foobar";
5− mqttUsername = "homeassistant";
6− mqttPassword = "secret";
75in {
86 name = "home-assistant";
97 meta.maintainers = lib.teams.home-assistant.members;
@@ -11,18 +9,6 @@ in {
119 nodes.hass = { pkgs, ... }: {
1210 environment.systemPackages = with pkgs; [ mosquitto ];
1311
14− services.mosquitto = {
15− enable = true;
16− listeners = [ {
17− users = {
18− "${mqttUsername}" = {
19− acl = [ "readwrite #" ];
20− password = mqttPassword;
21− };
22− };
23− } ];
24− };
25−
2612 services.postgresql = {
2713 enable = true;
2814 ensureDatabases = [ "hass" ];
@@ -76,23 +62,6 @@ in {
7662 # https://www.home-assistant.io/integrations/frontend/
7763 frontend = {};
7864
79− # configure an mqtt broker connection
80− # https://www.home-assistant.io/integrations/mqtt
81− mqtt = {
82− broker = "127.0.0.1";
83− username = mqttUsername;
84− password = mqttPassword;
85− };
86−
87− # create a mqtt sensor that syncs state with its mqtt topic
88− # https://www.home-assistant.io/integrations/sensor.mqtt/
89− binary_sensor = [ {
90− platform = "mqtt";
91− state_topic = "home-assistant/test";
92− payload_on = "let_there_be_light";
93− payload_off = "off";
94− } ];
95−
9665 # set up a wake-on-lan switch to test capset capability required
9766 # for the ping suid wrapper
9867 # https://www.home-assistant.io/integrations/wake_on_lan/
@@ -109,11 +78,9 @@ in {
10978 listen_port = 80;
11079 };
11180
112− # show mqtt interaction in the log
11381 # https://www.home-assistant.io/integrations/logger/
11482 logger = {
11583 default = "info";
116− logs."homeassistant.components.mqtt" = "debug";
11784 };
11885 };
11986
@@ -167,12 +134,6 @@ in {
167134 hass.wait_for_open_port(8123)
168135 hass.succeed("curl --fail http://localhost:8123/lovelace")
169136
170− with subtest("Toggle a binary sensor using MQTT"):
171− hass.wait_for_open_port(1883)
172− hass.succeed(
173− "mosquitto_pub -V mqttv5 -t home-assistant/test -u ${mqttUsername} -P '${mqttPassword}' -m let_there_be_light"
174− )
175−
176137 with subtest("Check that capabilities are passed for emulated_hue to bind to port 80"):
177138 hass.wait_for_open_port(80)
178139 hass.succeed("curl --fail http://localhost:80/description.xml")
@@ -188,10 +149,6 @@ in {
188149 with subtest("Check that no errors were logged"):
189150 assert "ERROR" not in output_log
190151
191− # example line: 2020-06-20 10:01:32 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on home-assistant/test: b'let_there_be_light'
192− with subtest("Check we received the mosquitto message"):
193− assert "let_there_be_light" in output_log
194−
195152 with subtest("Check systemd unit hardening"):
196153 hass.log(hass.succeed("systemctl cat home-assistant.service"))
197154 hass.log(hass.succeed("systemd-analyze security home-assistant.service"))
pkgs/development/python-modules/aiodiscover/default.nix+2−2
@@ -12,7 +12,7 @@
1212
1313buildPythonPackage rec {
1414 pname = "aiodiscover";
15− version = "1.4.7";
15+ version = "1.4.8";
1616 format = "setuptools";
1717
1818 disabled = pythonOlder "3.7";
@@ -21,7 +21,7 @@ buildPythonPackage rec {
2121 owner = "bdraco";
2222 repo = pname;
2323 rev = "v${version}";
24− sha256 = "sha256-NtiShZpPFl+elYNPLaKAg6uV8pDJv0pyR+NTUiFoMm0=";
24+ sha256 = "sha256-ts3PnL1ePWJHHaLuC0eQKqBOt+HeEeAayeVBAIhnUWs=";
2525 };
2626
2727 propagatedBuildInputs = [
pkgs/development/python-modules/aiohomekit/default.nix+4−2
@@ -12,7 +12,7 @@
1212
1313buildPythonPackage rec {
1414 pname = "aiohomekit";
15− version = "0.6.11";
15+ version = "0.7.15";
1616 format = "pyproject";
1717
1818 disabled = pythonOlder "3.7";
@@ -21,7 +21,7 @@ buildPythonPackage rec {
2121 owner = "Jc2k";
2222 repo = pname;
2323 rev = version;
24− sha256 = "1rrdzzb2gcl3lc8l5vb99hy2lmdj5723fds2q78n4sf83y93czw7";
24+ sha256 = "sha256-na94H1ll9aZz/mQ4/y3b2vhSaOgo4OjtIsAfW6zGYyI=";
2525 };
2626
2727 nativeBuildInputs = [
@@ -34,6 +34,8 @@ buildPythonPackage rec {
3434 zeroconf
3535 ];
3636
37+ doCheck = lib.versionAtLeast pytest-aiohttp.version "1.0.0";
38+
3739 checkInputs = [
3840 pytest-aiohttp
3941 pytestCheckHook
pkgs/development/python-modules/aiohue/default.nix+2−2
@@ -8,14 +8,14 @@
88
99buildPythonPackage rec {
1010 pname = "aiohue";
11− version = "4.2.1";
11+ version = "4.3.0";
1212 format = "setuptools";
1313
1414 disabled = pythonOlder "3.8";
1515
1616 src = fetchPypi {
1717 inherit pname version;
18− hash = "sha256-bcSCYNJt9xYBMmuZYM6s+PWV0TAUFOn3ibHE0KRX+iw=";
18+ hash = "sha256-PslmDeG/o9WAOc0FhidUNaISrlXa3rba3UEuvPVN/+A=";
1919 };
2020
2121 propagatedBuildInputs = [
pkgs/development/python-modules/aiopvpc/default.nix+5
@@ -46,6 +46,11 @@ buildPythonPackage rec {
4646 pytestCheckHook
4747 ];
4848
49+ disabledTests = [
50+ # Failures seem related to changes in holidays-0.13, https://github.com/azogue/aiopvpc/issues/44
51+ "test_number_of_national_holidays"
52+ ];
53+
4954 postPatch = ''
5055 substituteInPlace pyproject.toml --replace \
5156 " --cov --cov-report term --cov-report html" ""
pkgs/development/python-modules/aioshelly/default.nix+2−2
@@ -8,7 +8,7 @@
88
99buildPythonPackage rec {
1010 pname = "aioshelly";
11− version = "1.0.10";
11+ version = "1.0.11";
1212 format = "setuptools";
1313
1414 disabled = pythonOlder "3.8";
@@ -17,7 +17,7 @@ buildPythonPackage rec {
1717 owner = "home-assistant-libs";
1818 repo = pname;
1919 rev = version;
20− hash = "sha256-YHdHh7uC9QF+dj+SI2Y4rEkBq+gGalNBmuWFVgq7XOM=";
20+ hash = "sha256-N+8vmB41AUu4aTUTBYX6SPVsW1PARaq5mCOdhg9h0/g=";
2121 };
2222
2323 propagatedBuildInputs = [
pkgs/development/python-modules/asyncsleepiq/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, aiohttp
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "asyncsleepiq";
9+ version = "1.1.0";
10+
11+ format = "setuptools";
12+
13+ src = fetchPypi {
14+ inherit pname version;
15+ sha256 = "93c944ff84fd23832b188320b10681a3b1caf935dd584cdd4e508a9bcc8fec1b";
16+ };
17+
18+ propagatedBuildInputs = [
19+ aiohttp
20+ ];
21+
22+ # upstream has no tests
23+ doCheck = false;
24+
25+ pythonImportsCheck = [ "asyncsleepiq" ];
26+
27+ meta = with lib; {
28+ description = "Async interface to SleepIQ API";
29+ homepage = "https://github.com/kbickar/asyncsleepiq";
30+ license = licenses.mit;
31+ maintainers = with maintainers; [ dotlambda ];
32+ };
33+}
pkgs/development/python-modules/elkm1-lib/default.nix+2−11
@@ -11,7 +11,7 @@
1111
1212buildPythonPackage rec {
1313 pname = "elkm1-lib";
14− version = "1.0.0";
14+ version = "1.2.0";
1515 format = "pyproject";
1616
1717 disabled = pythonOlder "3.6";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
2020 owner = "gwww";
2121 repo = "elkm1";
2222 rev = version;
23− sha256 = "04xidix6l5d9rqfwp6cmj6wvais04nlvz5ynp0zwgyjp9sh2nhp6";
23+ hash = "sha256-+rFW7qFpay/ebUz9EEB8nn0kuqVtVmG5ZHOWG2bMPts=";
2424 };
2525
2626 nativeBuildInputs = [
@@ -36,15 +36,6 @@ buildPythonPackage rec {
3636 pytestCheckHook
3737 ];
3838
39− patches = [
40− # Switch to poetry-core, https://github.com/gwww/elkm1/pull/45
41− (fetchpatch {
42− name = "switch-to-poetry-core.patch";
43− url = "https://github.com/gwww/elkm1/commit/807a17268498298908bf82af4933b158b37c8f32.patch";
44− sha256 = "1539g8wsxppqj6dm6w81ps05frb8vrfaxahxn2cqs76zdhvly3p9";
45− })
46− ];
47−
4839 pythonImportsCheck = [ "elkm1_lib" ];
4940
5041 meta = with lib; {
pkgs/development/python-modules/gridnet/default.nixnew file+57
@@ -0,0 +1,57 @@
1+{ lib
2+, buildPythonPackage
3+, pythonOlder
4+, fetchFromGitHub
5+, poetry-core
6+, aiohttp
7+, yarl
8+, aresponses
9+, pytest-asyncio
10+, pytestCheckHook
11+}:
12+
13+buildPythonPackage rec {
14+ pname = "gridnet";
15+ version = "4.0.0";
16+
17+ disabled = pythonOlder "3.9";
18+
19+ format = "pyproject";
20+
21+ src = fetchFromGitHub {
22+ owner = "klaasnicolaas";
23+ repo = "python-gridnet";
24+ rev = "v${version}";
25+ hash = "sha256-Ihs8qUx50tAUcRBsVArRhzoLcQUi1vbYh8sPyK75AEk=";
26+ };
27+
28+ postPatch = ''
29+ substituteInPlace pyproject.toml \
30+ --replace "0.0.0" "${version}" \
31+ --replace "--cov" ""
32+ '';
33+
34+ nativeBuildInputs = [
35+ poetry-core
36+ ];
37+
38+ propagatedBuildInputs = [
39+ aiohttp
40+ yarl
41+ ];
42+
43+ checkInputs = [
44+ aresponses
45+ pytest-asyncio
46+ pytestCheckHook
47+ ];
48+
49+ pythonImportsCheck = [ "gridnet" ];
50+
51+ meta = with lib; {
52+ description = "Asynchronous Python client for NET2GRID devices";
53+ homepage = "https://github.com/klaasnicolaas/python-gridnet";
54+ license = licenses.mit;
55+ maintainers = with maintainers; [ dotlambda ];
56+ };
57+}
pkgs/development/python-modules/hass-nabucasa/default.nix+4−2
@@ -15,13 +15,13 @@
1515
1616buildPythonPackage rec {
1717 pname = "hass-nabucasa";
18− version = "0.52.0";
18+ version = "0.54.0";
1919
2020 src = fetchFromGitHub {
2121 owner = "nabucasa";
2222 repo = pname;
2323 rev = version;
24− sha256 = "sha256-mTbNuER26BPQIjcmlpkdFNeBcNF1vTldaNpoEla0XbM=";
24+ sha256 = "sha256-UL7HPmii65p+WO22y0qv8zq3yICKarRORqE+FK1u7OE=";
2525 };
2626
2727 postPatch = ''
@@ -41,6 +41,8 @@ buildPythonPackage rec {
4141 warrant
4242 ];
4343
44+ doCheck = lib.versionAtLeast pytest-aiohttp.version "1.0.0";
45+
4446 checkInputs = [
4547 asynctest
4648 pytest-aiohttp
pkgs/development/python-modules/holidays/default.nix+2−2
@@ -11,14 +11,14 @@
1111
1212buildPythonPackage rec {
1313 pname = "holidays";
14− version = "0.12";
14+ version = "0.13";
1515 format = "setuptools";
1616
1717 disabled = pythonOlder "3.6";
1818
1919 src = fetchPypi {
2020 inherit pname version;
21− sha256 = "d99f2b6ddc5bfab7b7f8bbed457a82104f8980122a04b982bfc0e4f8820a1d46";
21+ sha256 = "sha256-xvfDq4ralIBnAtqTHZTTfNYbz6kstNOdNRtqnFIQZ1w=";
2222 };
2323
2424 propagatedBuildInputs = [
pkgs/development/python-modules/pydeconz/default.nix+2−2
@@ -10,7 +10,7 @@
1010
1111buildPythonPackage rec {
1212 pname = "pydeconz";
13− version = "86";
13+ version = "87";
1414 format = "setuptools";
1515
1616 disabled = pythonOlder "3.7";
@@ -19,7 +19,7 @@ buildPythonPackage rec {
1919 owner = "Kane610";
2020 repo = "deconz";
2121 rev = "v${version}";
22− sha256 = "sha256-NqNXbF5rGMCbugzZY+AQPPHYmQx/RrSwqtnoF1shSSU=";
22+ sha256 = "sha256-scNTHbUL8TOhkUJyib4cgL8A4gZ73asmFLi8aGw3sX8=";
2323 };
2424
2525 propagatedBuildInputs = [
pkgs/development/python-modules/pyefergy/default.nix+13−5
@@ -1,15 +1,18 @@
11{ lib
22, aiohttp
3+, aresponses
34, buildPythonPackage
45, fetchFromGitHub
56, iso4217
7+, pytest-asyncio
8+, pytestCheckHook
69, pythonOlder
710, pytz
811}:
912
1013buildPythonPackage rec {
1114 pname = "pyefergy";
12− version = "0.1.5";
15+ version = "22.1.1";
1316 format = "setuptools";
1417
1518 disabled = pythonOlder "3.8";
@@ -18,7 +21,7 @@ buildPythonPackage rec {
1821 owner = "tkdrob";
1922 repo = pname;
2023 rev = version;
21− sha256 = "sha256-8xcKgsZ6buaQdrKD8Qn7jB5IlQ0NkR0nZGuFk+Dd8Q8=";
24+ sha256 = "sha256-AdoM+PcVoajxhnEfkyN9UuNufChu8XGmZDLNC3mjrps=";
2225 };
2326
2427 propagatedBuildInputs = [
@@ -27,10 +30,15 @@ buildPythonPackage rec {
2730 pytz
2831 ];
2932
30− # Project has no tests
31− doCheck = false;
33+ checkInputs = [
34+ aresponses
35+ pytest-asyncio
36+ pytestCheckHook
37+ ];
3238
33− pythonImportsCheck = [ "pyefergy" ];
39+ pythonImportsCheck = [
40+ "pyefergy"
41+ ];
3442
3543 meta = with lib; {
3644 description = "Python API library for Efergy energy meters";
pkgs/development/python-modules/pynina/default.nix+2−2
@@ -7,7 +7,7 @@
77
88buildPythonPackage rec {
99 pname = "pynina";
10− version = "0.1.4";
10+ version = "0.1.7";
1111 format = "setuptools";
1212
1313 disabled = pythonOlder "3.7";
@@ -15,7 +15,7 @@ buildPythonPackage rec {
1515 src = fetchPypi {
1616 pname = "PyNINA";
1717 inherit version;
18− sha256 = "1q382b70ydzzbqb9sa5y5w7039rp6q0wyffarrsdw916kbc4zyqd";
18+ sha256 = "sha256-7sceYmzOmXJMKaIdGmXMuCAum0aJeVTxx1w/jZy5Eig=";
1919 };
2020
2121 propagatedBuildInputs = [
pkgs/development/python-modules/radios/default.nixnew file+67
@@ -0,0 +1,67 @@
1+{ lib
2+, buildPythonPackage
3+, pythonOlder
4+, fetchFromGitHub
5+, poetry-core
6+, aiodns
7+, aiohttp
8+, awesomeversion
9+, backoff
10+, cachetools
11+, pycountry
12+, pydantic
13+, yarl
14+, pytest-asyncio
15+, pytestCheckHook
16+}:
17+
18+buildPythonPackage rec {
19+ pname = "radios";
20+ version = "0.1.0";
21+
22+ disabled = pythonOlder "3.9";
23+
24+ format = "pyproject";
25+
26+ src = fetchFromGitHub {
27+ owner = "frenck";
28+ repo = "python-radios";
29+ rev = "v${version}";
30+ hash = "sha256-3xRtOGY9DYnZN0g95213vWDbO3/XZZ5+s7A9sqNmO/w=";
31+ };
32+
33+ postPatch = ''
34+ substituteInPlace pyproject.toml \
35+ --replace "0.0.0" "${version}" \
36+ --replace "--cov" ""
37+ '';
38+
39+ nativeBuildInputs = [
40+ poetry-core
41+ ];
42+
43+ propagatedBuildInputs = [
44+ aiodns
45+ aiohttp
46+ awesomeversion
47+ backoff
48+ cachetools
49+ pycountry
50+ pydantic
51+ yarl
52+ ];
53+
54+ checkInputs = [
55+ pytest-asyncio
56+ pytestCheckHook
57+ ];
58+
59+ pythonImportsCheck = [ "radios" ];
60+
61+ meta = with lib; {
62+ description = "Asynchronous Python client for the Radio Browser API";
63+ homepage = "https://github.com/frenck/python-radios";
64+ license = licenses.mit;
65+ maintainers = with maintainers; [ dotlambda ];
66+ };
67+}
pkgs/development/python-modules/snitun/default.nix+2−2
@@ -11,13 +11,13 @@
1111
1212buildPythonPackage rec {
1313 pname = "snitun";
14− version = "0.30.0";
14+ version = "0.31.0";
1515
1616 src = fetchFromGitHub {
1717 owner = "NabuCasa";
1818 repo = pname;
1919 rev = version;
20− sha256 = "sha256-IjdgxX6ed9IWMFaMXIXQWZWoODrZBzXtMAcMOIhPFVQ=";
20+ sha256 = "sha256-Ehafb35H462Ffn6omGh/MDJKQX5qJJZeiIBO3n0IGlA=";
2121 };
2222
2323 propagatedBuildInputs = [
pkgs/development/python-modules/zha-quirks/default.nix+2−2
@@ -9,13 +9,13 @@
99
1010buildPythonPackage rec {
1111 pname = "zha-quirks";
12− version = "0.0.66";
12+ version = "0.0.67";
1313
1414 src = fetchFromGitHub {
1515 owner = "zigpy";
1616 repo = "zha-device-handlers";
1717 rev = version;
18− sha256 = "18g0i6b60ndfmbvdsx5pniq56fyc5k39ylp3sjhrfjcj434wvbvc";
18+ sha256 = "sha256-qkXXrwqMEtfafHsXtlyy6HFwuo/8sOZuQ9SvGRJkGtA=";
1919 };
2020
2121 propagatedBuildInputs = [
pkgs/development/python-modules/zwave-js-server-python/default.nix+6−2
@@ -2,6 +2,7 @@
22, aiohttp
33, buildPythonPackage
44, fetchFromGitHub
5+, pydantic
56, pytest-aiohttp
67, pytestCheckHook
78, pythonOlder
@@ -9,7 +10,7 @@
910
1011buildPythonPackage rec {
1112 pname = "zwave-js-server-python";
12− version = "0.34.0";
13+ version = "0.35.1";
1314 format = "setuptools";
1415
1516 disabled = pythonOlder "3.8";
@@ -18,13 +19,16 @@ buildPythonPackage rec {
1819 owner = "home-assistant-libs";
1920 repo = pname;
2021 rev = version;
21− sha256 = "sha256-hqq/CYlM9ZahDiH3iFLFzfE22CB19WQnFIDt+gCrEXU=";
22+ sha256 = "sha256-WmpXQttcQ3Z/SFkNPfmvPWPGzWectQBoI9+bL2QYeaY=";
2223 };
2324
2425 propagatedBuildInputs = [
2526 aiohttp
27+ pydantic
2628 ];
2729
30+ doCheck = lib.versionAtLeast pytest-aiohttp.version "1.0.0";
31+
2832 checkInputs = [
2933 pytest-aiohttp
3034 pytestCheckHook
pkgs/servers/home-assistant/component-packages.nix+22−12
@@ -2,7 +2,7 @@
22# Do not edit!
33
44{
5− version = "2022.2.9";
5+ version = "2022.3.1";
66 components = {
77 "abode" = ps: with ps; [ abodepy ];
88 "accuweather" = ps: with ps; [ accuweather ];
@@ -44,7 +44,6 @@
4444 "apache_kafka" = ps: with ps; [ aiokafka ];
4545 "apcupsd" = ps: with ps; [ apcaccess ];
4646 "api" = ps: with ps; [ aiohttp-cors ];
47− "apns" = ps: with ps; [ ]; # missing inputs: apns2
4847 "apple_tv" = ps: with ps; [ aiohttp-cors ifaddr pyatv zeroconf ];
4948 "apprise" = ps: with ps; [ apprise ];
5049 "aprs" = ps: with ps; [ aprslib geopy ];
@@ -166,7 +165,7 @@
166165 "deconz" = ps: with ps; [ pydeconz ];
167166 "decora" = ps: with ps; [ bluepy ]; # missing inputs: decora
168167 "decora_wifi" = ps: with ps; [ ]; # missing inputs: decora_wifi
169− "default_config" = ps: with ps; [ pynacl pyturbojpeg aiodiscover aiohttp-cors async-upnp-client emoji hass-nabucasa home-assistant-frontend ifaddr pillow pyserial pyudev scapy sqlalchemy zeroconf ];
168+ "default_config" = ps: with ps; [ pynacl pyturbojpeg aiodiscover aiohttp-cors async-upnp-client hass-nabucasa home-assistant-frontend ifaddr pillow pyserial pyudev scapy sqlalchemy zeroconf ];
170169 "delijn" = ps: with ps; [ pydelijn ];
171170 "deluge" = ps: with ps; [ deluge-client ];
172171 "demo" = ps: with ps; [ aiohttp-cors sqlalchemy ];
@@ -188,12 +187,13 @@
188187 "digitalloggers" = ps: with ps; [ ]; # missing inputs: dlipower
189188 "directv" = ps: with ps; [ directv ];
190189 "discogs" = ps: with ps; [ discogs-client ];
191− "discord" = ps: with ps; [ discordpy ];
190+ "discord" = ps: with ps; [ nextcord ];
192191 "discovery" = ps: with ps; [ aiohttp-cors ifaddr netdisco zeroconf ];
193192 "dlib_face_detect" = ps: with ps; [ face_recognition ];
194193 "dlib_face_identify" = ps: with ps; [ face_recognition ];
195194 "dlink" = ps: with ps; [ ]; # missing inputs: pyW215
196195 "dlna_dmr" = ps: with ps; [ aiohttp-cors async-upnp-client ifaddr zeroconf ];
196+ "dlna_dms" = ps: with ps; [ aiohttp-cors async-upnp-client ifaddr zeroconf ];
197197 "dnsip" = ps: with ps; [ aiodns ];
198198 "dominos" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pizzapi
199199 "doods" = ps: with ps; [ pillow pydoods ];
@@ -224,7 +224,7 @@
224224 "eight_sleep" = ps: with ps; [ pyeight ];
225225 "elgato" = ps: with ps; [ elgato ];
226226 "eliqonline" = ps: with ps; [ eliqonline ];
227− "elkm1" = ps: with ps; [ elkm1-lib ];
227+ "elkm1" = ps: with ps; [ aiohttp-cors elkm1-lib ifaddr ];
228228 "elmax" = ps: with ps; [ elmax-api ];
229229 "elv" = ps: with ps; [ pypca ];
230230 "emby" = ps: with ps; [ pyemby ];
@@ -273,6 +273,7 @@
273273 "fireservicerota" = ps: with ps; [ pyfireservicerota ];
274274 "firmata" = ps: with ps; [ pymata-express ];
275275 "fitbit" = ps: with ps; [ aiohttp-cors fitbit ];
276+ "fivem" = ps: with ps; [ ]; # missing inputs: fivem-api
276277 "fixer" = ps: with ps; [ fixerio ];
277278 "fjaraskupan" = ps: with ps; [ fjaraskupan ];
278279 "fleetgo" = ps: with ps; [ ritassist ];
@@ -324,7 +325,6 @@
324325 "gitlab_ci" = ps: with ps; [ python-gitlab ];
325326 "gitter" = ps: with ps; [ ]; # missing inputs: gitterpy
326327 "glances" = ps: with ps; [ glances-api ];
327− "gntp" = ps: with ps; [ gntp ];
328328 "goalfeed" = ps: with ps; [ ]; # missing inputs: pysher
329329 "goalzero" = ps: with ps; [ goalzero ];
330330 "gogogate2" = ps: with ps; [ ismartgate ];
@@ -446,7 +446,7 @@
446446 "kiwi" = ps: with ps; [ ]; # missing inputs: kiwiki-client
447447 "kmtronic" = ps: with ps; [ pykmtronic ];
448448 "knx" = ps: with ps; [ xknx ];
449− "kodi" = ps: with ps; [ pykodi ];
449+ "kodi" = ps: with ps; [ aiohttp-cors pykodi ];
450450 "konnected" = ps: with ps; [ aiohttp-cors konnected ];
451451 "kostal_plenticore" = ps: with ps; [ ]; # missing inputs: kostal_plenticore
452452 "kraken" = ps: with ps; [ krakenex pykrakenapi ];
@@ -532,11 +532,12 @@
532532 "minio" = ps: with ps; [ minio ];
533533 "mitemp_bt" = ps: with ps; [ ]; # missing inputs: mitemp_bt
534534 "mjpeg" = ps: with ps; [ ];
535− "mobile_app" = ps: with ps; [ pynacl pyturbojpeg aiohttp-cors emoji hass-nabucasa pillow ];
535+ "mobile_app" = ps: with ps; [ pynacl pyturbojpeg aiohttp-cors hass-nabucasa pillow ];
536536 "mochad" = ps: with ps; [ ]; # missing inputs: pymochad
537537 "modbus" = ps: with ps; [ pymodbus ];
538538 "modem_callerid" = ps: with ps; [ aiohttp-cors phone-modem pyserial pyudev ];
539539 "modern_forms" = ps: with ps; [ aiomodernforms ];
540+ "moehlenhoff_alpha2" = ps: with ps; [ ]; # missing inputs: moehlenhoff-alpha2
540541 "mold_indicator" = ps: with ps; [ ];
541542 "monoprice" = ps: with ps; [ ]; # missing inputs: pymonoprice
542543 "moon" = ps: with ps; [ ];
@@ -680,6 +681,7 @@
680681 "proxy" = ps: with ps; [ pillow ];
681682 "ps4" = ps: with ps; [ ]; # missing inputs: pyps4-2ndscreen
682683 "pulseaudio_loopback" = ps: with ps; [ pulsectl ];
684+ "pure_energie" = ps: with ps; [ gridnet ];
683685 "push" = ps: with ps; [ aiohttp-cors ];
684686 "pushbullet" = ps: with ps; [ pushbullet ];
685687 "pushover" = ps: with ps; [ pushover-complete ];
@@ -697,6 +699,7 @@
697699 "qwikswitch" = ps: with ps; [ ]; # missing inputs: pyqwikswitch
698700 "rachio" = ps: with ps; [ pyturbojpeg aiohttp-cors hass-nabucasa rachiopy ];
699701 "radarr" = ps: with ps; [ ];
702+ "radio_browser" = ps: with ps; [ radios ];
700703 "radiotherm" = ps: with ps; [ radiotherm ];
701704 "rainbird" = ps: with ps; [ ]; # missing inputs: pyrainbird
702705 "raincloud" = ps: with ps; [ ]; # missing inputs: raincloudy
@@ -791,7 +794,7 @@
791794 "skybeacon" = ps: with ps; [ pygatt ];
792795 "skybell" = ps: with ps; [ skybellpy ];
793796 "slack" = ps: with ps; [ slackclient ];
794− "sleepiq" = ps: with ps; [ sleepyq ];
797+ "sleepiq" = ps: with ps; [ asyncsleepiq ];
795798 "slide" = ps: with ps; [ ]; # missing inputs: goslide-api
796799 "sma" = ps: with ps; [ pysma ];
797800 "smappee" = ps: with ps; [ aiohttp-cors pysmappee ];
@@ -814,7 +817,7 @@
814817 "soma" = ps: with ps; [ pysoma ];
815818 "somfy" = ps: with ps; [ aiohttp-cors pymfy ];
816819 "somfy_mylink" = ps: with ps; [ somfy-mylink-synergy ];
817− "sonarr" = ps: with ps; [ sonarr ];
820+ "sonarr" = ps: with ps; [ aiopyarr ];
818821 "songpal" = ps: with ps; [ python-songpal ];
819822 "sonos" = ps: with ps; [ aiohttp-cors async-upnp-client ifaddr plexapi plexauth plexwebsocket soco spotipy zeroconf ];
820823 "sony_projector" = ps: with ps; [ pysdcp ];
@@ -924,7 +927,7 @@
924927 "twilio_call" = ps: with ps; [ aiohttp-cors twilio ];
925928 "twilio_sms" = ps: with ps; [ aiohttp-cors twilio ];
926929 "twinkly" = ps: with ps; [ ttls ];
927− "twitch" = ps: with ps; [ python-twitch-client ];
930+ "twitch" = ps: with ps; [ twitchapi ];
928931 "twitter" = ps: with ps; [ twitterapi ];
929932 "ubus" = ps: with ps; [ openwrt-ubus-rpc ];
930933 "ue_smart_radio" = ps: with ps; [ ];
@@ -990,6 +993,7 @@
990993 "wilight" = ps: with ps; [ pywilight ];
991994 "wirelesstag" = ps: with ps; [ ]; # missing inputs: wirelesstagpy
992995 "withings" = ps: with ps; [ aiohttp-cors ]; # missing inputs: withings-api
996+ "wiz" = ps: with ps; [ aiohttp-cors ifaddr pywizlight ];
993997 "wled" = ps: with ps; [ wled ];
994998 "wolflink" = ps: with ps; [ ]; # missing inputs: wolf_smartset
995999 "workday" = ps: with ps; [ holidays ];
@@ -998,7 +1002,6 @@
9981002 "worxlandroid" = ps: with ps; [ ];
9991003 "wsdot" = ps: with ps; [ ];
10001004 "x10" = ps: with ps; [ ];
1001− "xbee" = ps: with ps; [ ]; # missing inputs: xbee-helper
10021005 "xbox" = ps: with ps; [ aiohttp-cors xbox-webapi ];
10031006 "xbox_live" = ps: with ps; [ xboxapi ];
10041007 "xeoma" = ps: with ps; [ pyxeoma ];
@@ -1031,6 +1034,7 @@
10311034 "zoneminder" = ps: with ps; [ zm-py ];
10321035 "zwave" = ps: with ps; [ homeassistant-pyozw pydispatcher ];
10331036 "zwave_js" = ps: with ps; [ aiohttp-cors pyserial pyudev zwave-js-server-python ];
1037+ "zwave_me" = ps: with ps; [ aiohttp-cors ifaddr url-normalize zeroconf ]; # missing inputs: zwave_me_ws
10341038 };
10351039 # components listed in tests/components for which all dependencies are packaged
10361040 supportedComponentsWithTests = [
@@ -1143,6 +1147,7 @@
11431147 "directv"
11441148 "discovery"
11451149 "dlna_dmr"
1150+ "dlna_dms"
11461151 "dnsip"
11471152 "doorbird"
11481153 "dsmr"
@@ -1343,6 +1348,7 @@
13431348 "min_max"
13441349 "minecraft_server"
13451350 "minio"
1351+ "mjpeg"
13461352 "mobile_app"
13471353 "modbus"
13481354 "modem_callerid"
@@ -1423,6 +1429,7 @@
14231429 "prometheus"
14241430 "prosegur"
14251431 "proximity"
1432+ "pure_energie"
14261433 "push"
14271434 "pushbullet"
14281435 "pvoutput"
@@ -1431,6 +1438,7 @@
14311438 "qld_bushfire"
14321439 "rachio"
14331440 "radarr"
1441+ "radio_browser"
14341442 "rainforest_eagle"
14351443 "rainmachine"
14361444 "random"
@@ -1459,6 +1467,7 @@
14591467 "safe_mode"
14601468 "samsungtv"
14611469 "scene"
1470+ "scrape"
14621471 "screenlogic"
14631472 "script"
14641473 "search"
@@ -1605,6 +1614,7 @@
16051614 "whois"
16061615 "wiffi"
16071616 "wilight"
1617+ "wiz"
16081618 "wled"
16091619 "workday"
16101620 "worldclock"
pkgs/servers/home-assistant/default.nix+24−2
@@ -31,6 +31,26 @@ let
3131 # Override the version of some packages pinned in Home Assistant's setup.py and requirements_all.txt
3232 (mkOverride "python-slugify" "4.0.1" "69a517766e00c1268e5bbfc0d010a0a8508de0b18d30ad5a1ff357f8ae724270")
3333
34+ # pytest-aiohttp>0.3.0 breaks home-assistant tests
35+ (self: super: {
36+ pytest-aiohttp = super.pytest-aiohttp.overridePythonAttrs (oldAttrs: rec {
37+ version = "0.3.0";
38+ src = oldAttrs.src.override {
39+ inherit version;
40+ sha256 = "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9";
41+ };
42+ });
43+ aiohomekit = super.aiohomekit.overridePythonAttrs (oldAttrs: {
44+ doCheck = false; # requires aiohttp>=1.0.0
45+ });
46+ hass-nabucasa = super.hass-nabucasa.overridePythonAttrs (oldAttrs: {
47+ doCheck = false; # requires aiohttp>=1.0.0
48+ });
49+ zwave-js-server-python = super.zwave-js-server-python.overridePythonAttrs (oldAttrs: {
50+ doCheck = false; # requires aiohttp>=1.0.0
51+ });
52+ })
53+
3454 (self: super: {
3555 huawei-lte-api = super.huawei-lte-api.overridePythonAttrs (oldAttrs: rec {
3656 version = "1.4.18";
@@ -138,7 +158,7 @@ let
138158 extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs);
139159
140160 # Don't forget to run parse-requirements.py after updating
141− hassVersion = "2022.2.9";
161+ hassVersion = "2022.3.1";
142162
143163in python.pkgs.buildPythonApplication rec {
144164 pname = "homeassistant";
@@ -156,7 +176,7 @@ in python.pkgs.buildPythonApplication rec {
156176 owner = "home-assistant";
157177 repo = "core";
158178 rev = version;
159− hash = "sha256-So/MAKyFVa1TchrVE4ego1fRbgOXCoXR3w/rJLFSBqI=";
179+ hash = "sha256-bihb6DL8hQuRnJZp39Lh2qfTXr0tFxn7FHFZewttNOc=";
160180 };
161181
162182 # leave this in, so users don't have to constantly update their downstream patch handling
@@ -217,6 +237,8 @@ in python.pkgs.buildPythonApplication rec {
217237 yarl
218238 # Not in setup.py, but used in homeassistant/util/package.py
219239 setuptools
240+ # Not in setup.py, but uncounditionally imported via tests/conftest.py
241+ paho-mqtt
220242 ] ++ componentBuildInputs ++ extraBuildInputs;
221243
222244 makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip";
pkgs/servers/home-assistant/frontend.nix+2−2
@@ -4,7 +4,7 @@ buildPythonPackage rec {
44 # the frontend version corresponding to a specific home-assistant version can be found here
55 # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json
66 pname = "home-assistant-frontend";
7− version = "20220203.1";
7+ version = "20220301.0";
88 format = "wheel";
99
1010 src = fetchPypi {
@@ -12,7 +12,7 @@ buildPythonPackage rec {
1212 pname = "home_assistant_frontend";
1313 dist = "py3";
1414 python = "py3";
15− sha256 = "sha256-6+TzBhHo9+eo6Hlk8RF+BAt4O0i759iAN+dKAPDmTNY=";
15+ sha256 = "sha256-Gshw8GIiZfFHmldvxBhUKZ5NFWuBIA6ug7m7eEfQ+ao=";
1616 };
1717
1818 # there is nothing to strip in this package
pkgs/servers/home-assistant/tests.nix+11−1
@@ -11,8 +11,9 @@ let
1111 config = [ pydispatcher ];
1212 generic = [ ha-av ];
1313 google_translate = [ mutagen ];
14+ lovelace = [ PyChromecast ];
1415 nest = [ ha-av ];
15− onboarding = [ pymetno rpi-bad-power ];
16+ onboarding = [ pymetno radios rpi-bad-power ];
1617 version = [ aioaseko ];
1718 voicerss = [ mutagen ];
1819 yandextts = [ mutagen ];
@@ -28,6 +29,13 @@ let
2829 ];
2930 };
3031
32+ extraDisabledTests = {
33+ roku = [
34+ # homeassistant.components.roku.media_player:media_player.py:428 Media type music is not supported with format None (mime: audio/x-matroska)
35+ "test_services_play_media_audio"
36+ ];
37+ };
38+
3139 extraPytestFlagsArray = {
3240 asuswrt = [
3341 # asuswrt/test_config_flow.py: Sandbox network limitations, fails with unexpected error
@@ -45,6 +53,7 @@ in lib.listToAttrs (map (component: lib.nameValuePair component (
4553 ++ home-assistant.getPackages component home-assistant.python.pkgs
4654 ++ extraCheckInputs.${component} or [ ];
4755
56+ disabledTests = old.disabledTests ++ extraDisabledTests.${component} or [];
4857 disabledTestPaths = old.disabledTestPaths ++ extraDisabledTestPaths.${component} or [ ];
4958
5059 pytestFlagsArray = lib.remove "tests" old.pytestFlagsArray
@@ -59,6 +68,7 @@ in lib.listToAttrs (map (component: lib.nameValuePair component (
5968 broken = lib.elem component [
6069 "airtouch4"
6170 "dnsip"
71+ "zwave"
6272 ];
6373 # upstream only tests on Linux, so do we.
6474 platforms = lib.platforms.linux;
pkgs/top-level/python-packages.nix+6
@@ -714,6 +714,8 @@ in {
714714
715715 asyncpg = callPackage ../development/python-modules/asyncpg { };
716716
717+ asyncsleepiq = callPackage ../development/python-modules/asyncsleepiq { };
718+
717719 asyncssh = callPackage ../development/python-modules/asyncssh { };
718720
719721 asyncstdlib = callPackage ../development/python-modules/asyncstdlib { };
@@ -3577,6 +3579,8 @@ in {
35773579
35783580 growattserver = callPackage ../development/python-modules/growattserver { };
35793581
3582+ gridnet = callPackage ../development/python-modules/gridnet { };
3583+
35803584 grip = callPackage ../development/python-modules/grip { };
35813585
35823586 groestlcoin_hash = callPackage ../development/python-modules/groestlcoin_hash { };
@@ -8569,6 +8573,8 @@ in {
85698573
85708574 radio_beam = callPackage ../development/python-modules/radio_beam { };
85718575
8576+ radios = callPackage ../development/python-modules/radios { };
8577+
85728578 radiotherm = callPackage ../development/python-modules/radiotherm { };
85738579
85748580 radish-bdd = callPackage ../development/python-modules/radish-bdd { };