diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index dafb5b4976d..6111c357490 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2023.2.5"; + version = "2023.3.0"; components = { "3_day_blinds" = ps: with ps; [ ]; @@ -70,10 +70,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -200,10 +197,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -355,10 +349,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -378,9 +369,6 @@ bluetooth-data-tools dbus-fast fnvhash - home-assistant-frontend - janus - pillow pyserial pyudev sqlalchemy @@ -398,10 +386,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -420,10 +405,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -492,10 +474,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -811,6 +790,25 @@ ]; "dooya" = ps: with ps; [ ]; + "dormakaba_dkey" = ps: with ps; [ + aioesphomeapi + aiohttp-cors + aioruuvigateway + aioshelly + bleak-retry-connector + bleak + bluetooth-adapters + bluetooth-auto-recovery + bluetooth-data-tools + dbus-fast + esphome-dashboard-api + fnvhash + ifaddr + pyserial + pyudev + sqlalchemy + zeroconf + ]; # missing inputs: py-dormakaba-dkey "dovado" = ps: with ps; [ ]; # missing inputs: dovado "downloader" = ps: with ps; [ @@ -843,6 +841,8 @@ "eafm" = ps: with ps; [ aioeafm ]; + "easyenergy" = ps: with ps; [ + ]; # missing inputs: easyenergy "ebox" = ps: with ps; [ ]; # missing inputs: pyebox "ebusd" = ps: with ps; [ @@ -974,10 +974,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -997,10 +994,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -1023,10 +1017,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -1074,7 +1065,7 @@ ha-ffmpeg ]; "fibaro" = ps: with ps; [ - fiblary3-fork + pyfibaro ]; "fido" = ps: with ps; [ pyfido @@ -1127,10 +1118,7 @@ esphome-dashboard-api fjaraskupan fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -1376,10 +1364,7 @@ esphome-dashboard-api fnvhash govee-ble - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -1423,12 +1408,7 @@ ]; "hardkernel" = ps: with ps; [ aiohttp-cors - fnvhash - home-assistant-frontend - janus - pillow psutil-home-assistant - sqlalchemy ]; "hardware" = ps: with ps; [ psutil-home-assistant @@ -1441,11 +1421,6 @@ ]; "hassio" = ps: with ps; [ aiohttp-cors - fnvhash - home-assistant-frontend - janus - pillow - sqlalchemy ]; "havana_shade" = ps: with ps; [ ]; @@ -1514,15 +1489,12 @@ aiohttp-cors bellows fnvhash - home-assistant-frontend - ifaddr janus pillow pyserial-asyncio pyserial pyudev sqlalchemy - zeroconf zha-quirks zigpy-deconz zigpy-xbee @@ -1534,8 +1506,6 @@ aiohttp-cors bellows fnvhash - home-assistant-frontend - ifaddr janus pillow psutil-home-assistant @@ -1543,7 +1513,6 @@ pyserial pyudev sqlalchemy - zeroconf zha-quirks zigpy-deconz zigpy-xbee @@ -1555,8 +1524,6 @@ aiohttp-cors bellows fnvhash - home-assistant-frontend - ifaddr janus pillow psutil-home-assistant @@ -1564,7 +1531,6 @@ pyserial pyudev sqlalchemy - zeroconf zha-quirks zigpy-deconz zigpy-xbee @@ -1598,11 +1564,10 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow + pyroute2 pyserial + python-otbr-api pyudev sqlalchemy zeroconf @@ -1683,11 +1648,8 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ibeacon-ble ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -1744,11 +1706,8 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr inkbird-ble - janus - pillow pyserial pyudev sqlalchemy @@ -1877,11 +1836,8 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus kegtron-ble - pillow pyserial pyudev sqlalchemy @@ -1907,10 +1863,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -1930,6 +1883,8 @@ pykmtronic ]; "knx" = ps: with ps; [ + aiohttp-cors + janus xknx ]; "kodi" = ps: with ps; [ @@ -1999,10 +1954,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -2021,11 +1973,8 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus led-ble - pillow pyserial pyudev sqlalchemy @@ -2233,10 +2182,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -2320,11 +2266,8 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus moat-ble - pillow pyserial pyudev sqlalchemy @@ -2378,15 +2321,13 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow + mopeka-iot-ble pyserial pyudev sqlalchemy zeroconf - ]; # missing inputs: mopeka_iot_ble + ]; "motion_blinds" = ps: with ps; [ aiohttp-cors fnvhash @@ -2593,7 +2534,8 @@ aio-geojson-nsw-rfs-incidents ]; "nuheat" = ps: with ps; [ - ]; # missing inputs: nuheat + nuheat + ]; "nuki" = ps: with ps; [ pynuki ]; @@ -2638,8 +2580,6 @@ "onboarding" = ps: with ps; [ aiohttp-cors fnvhash - home-assistant-frontend - janus pillow sqlalchemy ]; @@ -2725,11 +2665,8 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus oralb-ble - pillow pyserial pyudev sqlalchemy @@ -2745,11 +2682,12 @@ "otbr" = ps: with ps; [ aiohttp-cors fnvhash - home-assistant-frontend - janus - pillow + ifaddr + pyroute2 + python-otbr-api sqlalchemy - ]; # missing inputs: python-otbr-api + zeroconf + ]; "otp" = ps: with ps; [ pyotp ]; @@ -2940,10 +2878,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev qingping-ble @@ -3004,12 +2939,7 @@ ]; "raspberry_pi" = ps: with ps; [ aiohttp-cors - fnvhash - home-assistant-frontend - janus - pillow psutil-home-assistant - sqlalchemy ]; "raspyrfm" = ps: with ps; [ ]; # missing inputs: raspyrfm-client @@ -3139,9 +3069,6 @@ bluetooth-data-tools dbus-fast fnvhash - home-assistant-frontend - janus - pillow pyserial pyudev sqlalchemy @@ -3159,10 +3086,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev ruuvitag-ble @@ -3260,10 +3184,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -3288,10 +3209,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sensorpro-ble @@ -3311,10 +3229,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sensorpush-ble @@ -3362,9 +3277,6 @@ bluetooth-data-tools dbus-fast fnvhash - home-assistant-frontend - janus - pillow pyserial pyudev sqlalchemy @@ -3490,10 +3402,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pysnooz pyudev @@ -3673,10 +3582,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -3798,10 +3704,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -3823,10 +3726,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -3845,6 +3745,13 @@ "thomson" = ps: with ps; [ ]; "thread" = ps: with ps; [ + aiohttp-cors + fnvhash + ifaddr + pyroute2 + python-otbr-api + sqlalchemy + zeroconf ]; "threshold" = ps: with ps; [ ]; @@ -3871,10 +3778,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -3924,6 +3828,9 @@ ]; "tplink_lte" = ps: with ps; [ ]; # missing inputs: tp-connected + "tplink_omada" = ps: with ps; [ + tplink-omada-client + ]; "traccar" = ps: with ps; [ aiohttp-cors pytraccar @@ -4264,10 +4171,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -4303,10 +4207,7 @@ dbus-fast esphome-dashboard-api fnvhash - home-assistant-frontend ifaddr - janus - pillow pyserial pyudev sqlalchemy @@ -4382,15 +4283,12 @@ aiohttp-cors bellows fnvhash - home-assistant-frontend - ifaddr janus pillow pyserial-asyncio pyserial pyudev sqlalchemy - zeroconf zha-quirks zigpy-deconz zigpy-xbee @@ -4804,6 +4702,7 @@ "modern_forms" "mold_indicator" "moon" + "mopeka" "motion_blinds" "motioneye" "mqtt" @@ -4839,6 +4738,7 @@ "notify_events" "notion" "nsw_rural_fire_service_feed" + "nuheat" "nuki" "number" "nut" @@ -4863,6 +4763,7 @@ "openweathermap" "opnsense" "oralb" + "otbr" "overkiz" "ovo_energy" "owntracks" @@ -5053,6 +4954,7 @@ "toon" "totalconnect" "tplink" + "tplink_omada" "traccar" "trace" "tractive" diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index b5e42fca6ae..28fc40315f5 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -2,6 +2,7 @@ , lib , callPackage , fetchFromGitHub +, fetchPypi , fetchpatch , python3 , substituteAll @@ -42,16 +43,6 @@ let }; }); - # https://github.com/postlund/pyatv/issues/1879 - aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec { - pname = "aiohttp"; - version = "3.8.1"; - src = self.fetchPypi { - inherit pname version; - hash = "sha256-/FRx4aVN4V73HBvG6+gNTcaB6mAOaL/Ry85AQn8LdXg="; - }; - }); - aiowatttime = super.aiowatttime.overridePythonAttrs (oldAttrs: rec { version = "0.1.1"; src = fetchFromGitHub { @@ -88,16 +79,6 @@ let }; }); - gridnet = super.gridnet.overridePythonAttrs (oldAttrs: rec { - version = "4.0.0"; - src = fetchFromGitHub { - owner = "klaasnicolaas"; - repo = "python-gridnet"; - rev = "refs/tags/v${version}"; - hash = "sha256-Ihs8qUx50tAUcRBsVArRhzoLcQUi1vbYh8sPyK75AEk="; - }; - }); - # Pinned due to API changes in 10.0 mcstatus = super.mcstatus.overridePythonAttrs (oldAttrs: rec { version = "9.3.0"; @@ -199,6 +180,22 @@ let doCheck = false; }); + sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "2.0.4"; + src = super.fetchPypi { + pname = "SQLAlchemy"; + inherit version; + hash = "sha256-laGOGmryEU29nuTxaK0zBw1jF+Ebr6KNmDzHtYX+kAs="; + }; + nativeCheckInputs = oldAttrs.nativeCheckInputs ++ (with super; [ + pytest-xdist + ]); + disabledTestPaths = (oldAttrs.disabledTestPaths or []) ++ [ + "test/aaa_profiling" + "test/ext/mypy" + ]; + }); + # Pinned due to API changes in 0.3.0 tailscale = super.tailscale.overridePythonAttrs (oldAttrs: rec { version = "0.2.0"; @@ -266,7 +263,7 @@ let extraBuildInputs = extraPackages python.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2023.2.5"; + hassVersion = "2023.3.0"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -279,18 +276,30 @@ in python.pkgs.buildPythonApplication rec { # don't try and fail to strip 6600+ python files, it takes minutes! dontStrip = true; - # PyPI tarball is missing tests/ directory - src = fetchFromGitHub { + # Primary source is the pypi sdist, because it contains translations + src = fetchPypi { + inherit pname version; + hash = "sha256-JxTvAUKZj59jL1czTBzPD7+6x1K7xGGGwZAO8f8dkzg="; + }; + + # Secondary source is git for tests + gitSrc = fetchFromGitHub { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-7rH4tEW5gQZ/dPkgGzygfT2PwdZGASuyiFrNyn3hfys="; + hash = "sha256-azH9CnHIY0iOLaF3Iqy+uJ6TuftUs1j4RcpXyRQrQws="; }; nativeBuildInputs = with python3.pkgs; [ setuptools ]; + # copy tests early, so patches apply as they would to the git repo + prePatch = '' + cp --no-preserve=mode --recursive ${gitSrc}/tests ./ + chmod u+x tests/auth/providers/test_command_line_cmd.sh + ''; + # leave this in, so users don't have to constantly update their downstream patch handling patches = [ (substituteAll { @@ -378,6 +387,7 @@ in python.pkgs.buildPythonApplication rec { requests-mock respx stdlib-list + syrupy tomli # required through tests/auth/mfa_modules/test_otp.py pyotp diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index a3b1e7df1a5..9bdbed311a4 100644 --- a/pkgs/servers/home-assistant/frontend.nix +++ b/pkgs/servers/home-assistant/frontend.nix @@ -4,7 +4,7 @@ buildPythonPackage rec { # the frontend version corresponding to a specific home-assistant version can be found here # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json pname = "home-assistant-frontend"; - version = "20230202.0"; + version = "20230301.0"; format = "wheel"; src = fetchPypi { @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "home_assistant_frontend"; dist = "py3"; python = "py3"; - hash = "sha256-Wo3bQnwTDSAC4EhJeYIXx1wODyx3wA2KMMaM3pJEkGw="; + hash = "sha256-2hxP2Wyjkvlje/RnZBtou3Y81d16SYBeAm+JX8hWct4="; }; # there is nothing to strip in this package diff --git a/pkgs/servers/home-assistant/patches/ffmpeg-path.patch b/pkgs/servers/home-assistant/patches/ffmpeg-path.patch index a72674ff7a5..a4177a35f48 100644 --- a/pkgs/servers/home-assistant/patches/ffmpeg-path.patch +++ b/pkgs/servers/home-assistant/patches/ffmpeg-path.patch @@ -1,8 +1,8 @@ diff --git a/homeassistant/components/ffmpeg/__init__.py b/homeassistant/components/ffmpeg/__init__.py -index 74c826f47d..91f359da2a 100644 +index a98766c78c..1c47bb1f80 100644 --- a/homeassistant/components/ffmpeg/__init__.py +++ b/homeassistant/components/ffmpeg/__init__.py -@@ -40,7 +40,7 @@ CONF_FFMPEG_BIN = "ffmpeg_bin" +@@ -41,7 +41,7 @@ CONF_FFMPEG_BIN = "ffmpeg_bin" CONF_EXTRA_ARGUMENTS = "extra_arguments" CONF_OUTPUT = "output" @@ -12,7 +12,7 @@ index 74c826f47d..91f359da2a 100644 CONFIG_SCHEMA = vol.Schema( { diff --git a/tests/components/ffmpeg/test_init.py b/tests/components/ffmpeg/test_init.py -index e1730ffdab..e9cd7934fd 100644 +index 521ac732e5..ab8a56934f 100644 --- a/tests/components/ffmpeg/test_init.py +++ b/tests/components/ffmpeg/test_init.py @@ -87,7 +87,7 @@ class TestFFmpegSetup: diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index 734823e9f47..39e6ab7478d 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -19,8 +19,10 @@ let homeassistant_sky_connect = [ bellows zha-quirks zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp zwave-js-server-python ]; homeassistant_yellow = [ bellows zha-quirks zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp ]; lovelace = [ PyChromecast ]; + mopeka = [ pyswitchbot ]; nest = [ av ]; onboarding = [ pymetno radios rpi-bad-power ]; + otbr = [ bellows zha-quirks zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp ]; raspberry_pi = [ rpi-bad-power ]; shelly = [ pyswitchbot ]; tilt_ble = [ govee-ble ibeacon-ble ]; @@ -55,6 +57,9 @@ let logbook = [ "--deselect tests/components/logbook/test_websocket_api.py::test_recorder_is_far_behind " ]; + modbus = [ + "--deselect tests/components/modbus/test_init.py::test_pymodbus_connect_fail" + ]; modem_callerid = [ # aioserial mock produces wrong state "--deselect tests/components/modem_callerid/test_init.py::test_setup_entry"