diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-07-06 23:09:18 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-07-07 02:03:21 +0200 |
commit | 9b7bd914d246b9db0a317163e026fcfbd426784f (patch) | |
tree | 5e3950dc98576997cd6e494b542cd8c9223cd031 /pkgs/servers | |
parent | 08ac808bb3c8ac66c844ab631dcc2dbd20cc8937 (diff) |
home-assistant: 2022.6.7 -> 2022.7.0
https://www.home-assistant.io/blog/2022/07/06/release-20227/
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 49 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 28 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/frontend.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/patches/wilight-import.patch | 52 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/tests.nix | 24 |
5 files changed, 125 insertions, 32 deletions
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 467c628c5666c..1c65fce6e7fe5 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 = "2022.6.7"; + version = "2022.7.0"; components = { "abode" = ps: with ps; [ abodepy @@ -61,8 +61,7 @@ aioairzone ]; "aladdin_connect" = ps: with ps; [ - aladdin-connect - ]; + ]; # missing inputs: AIOAladdinConnect "alarm_control_panel" = ps: with ps; [ ]; "alarmdecoder" = ps: with ps; [ @@ -801,6 +800,7 @@ pyfido ]; "file" = ps: with ps; [ + file-read-backwards ]; "filesize" = ps: with ps; [ ]; @@ -1134,6 +1134,14 @@ ]; "homeassistant" = ps: with ps; [ ]; + "homeassistant_yellow" = ps: with ps; [ + aiohttp-cors + fnvhash + home-assistant-frontend + lru-dict + pillow + sqlalchemy + ]; "homekit" = ps: with ps; [ hap-python pyqrcode @@ -1206,9 +1214,6 @@ "ialarm" = ps: with ps; [ pyialarm ]; - "ialarm_xr" = ps: with ps; [ - pyialarmxr-homeassistant - ]; "iammeter" = ps: with ps; [ ]; # missing inputs: iammeter "iaqualink" = ps: with ps; [ @@ -2427,7 +2432,8 @@ ] ++ pygatt.optional-dependencies.GATTTOOL; "skybell" = ps: with ps; [ - skybellpy + aioskybell + ha-ffmpeg ]; "slack" = ps: with ps; [ slackclient @@ -2479,7 +2485,7 @@ paho-mqtt ]; "snmp" = ps: with ps; [ - pysnmp + pysnmplib ]; "solaredge" = ps: with ps; [ solaredge @@ -2496,10 +2502,6 @@ "soma" = ps: with ps; [ pysoma ]; - "somfy" = ps: with ps; [ - aiohttp-cors - pymfy - ]; "somfy_mylink" = ps: with ps; [ somfy-mylink-synergy ]; @@ -2657,9 +2659,8 @@ "system_bridge" = ps: with ps; [ aiohttp-cors ifaddr - systembridge zeroconf - ]; + ]; # missing inputs: systembridgeconnector "system_health" = ps: with ps; [ aiohttp-cors ]; @@ -2916,8 +2917,7 @@ "uscis" = ps: with ps; [ ]; # missing inputs: uscisstatus "usgs_earthquakes_feed" = ps: with ps; [ - geojson-client - ]; + ]; # missing inputs: aio_geojson_usgs_earthquakes "utility_meter" = ps: with ps; [ croniter ]; @@ -3172,10 +3172,15 @@ "zha" = ps: with ps; [ aiohttp-cors bellows + fnvhash + home-assistant-frontend ifaddr + lru-dict + pillow pyserial-asyncio pyserial pyudev + sqlalchemy zeroconf zha-quirks zigpy-deconz @@ -3226,7 +3231,6 @@ "airtouch4" "airvisual" "airzone" - "aladdin_connect" "alarm_control_panel" "alarmdecoder" "alert" @@ -3338,6 +3342,7 @@ "ecobee" "econet" "efergy" + "eight_sleep" "elgato" "elkm1" "elmax" @@ -3440,6 +3445,7 @@ "home_connect" "home_plus_control" "homeassistant" + "homeassistant_yellow" "homekit" "homekit_controller" "homematic" @@ -3456,7 +3462,6 @@ "hvv_departures" "hyperion" "ialarm" - "ialarm_xr" "iaqualink" "icloud" "ifttt" @@ -3499,6 +3504,8 @@ "launch_library" "laundrify" "lcn" + "lg_soundbar" + "life360" "light" "litterrobot" "local_file" @@ -3635,6 +3642,7 @@ "rachio" "radarr" "radio_browser" + "radiotherm" "rainforest_eagle" "rainmachine" "random" @@ -3689,6 +3697,7 @@ "simplisafe" "simulated" "siren" + "skybell" "slack" "sleepiq" "slimproto" @@ -3700,11 +3709,11 @@ "smhi" "smtp" "snips" + "snmp" "solaredge" "solarlog" "solax" "soma" - "somfy" "somfy_mylink" "sonarr" "songpal" @@ -3738,7 +3747,6 @@ "syncthing" "syncthru" "synology_dsm" - "system_bridge" "system_health" "system_log" "tado" @@ -3795,7 +3803,6 @@ "uptime" "uptimerobot" "usb" - "usgs_earthquakes_feed" "utility_meter" "uvc" "vacuum" diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index ee069f19b0546..b343971f0442c 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -30,6 +30,20 @@ let defaultOverrides = [ # Override the version of some packages pinned in Home Assistant's setup.py and requirements_all.txt + (self: super: { + bsblan = super.bsblan.overridePythonAttrs (oldAttrs: rec { + version = "0.5.0"; + postPatch = null; + propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ super.cattrs ]; + src = fetchFromGitHub { + owner = "liudger"; + repo = "python-bsblan"; + rev = "v.${version}"; + hash = "sha256-yzlHcIb5QlG+jAgEtKlAcY7rESiUY7nD1YwqK63wgcg="; + }; + }); + }) + # pytest-aiohttp>0.3.0 breaks home-assistant tests (self: super: { pytest-aiohttp = super.pytest-aiohttp.overridePythonAttrs (oldAttrs: rec { @@ -176,7 +190,7 @@ let extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs); # Don't forget to run parse-requirements.py after updating - hassVersion = "2022.6.7"; + hassVersion = "2022.7.0"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -194,7 +208,7 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = version; - hash = "sha256-RR0CsPOzOdWRPSgmKGl3egrPXS1CDI+ODWZeLkVCSGQ="; + hash = "sha256-DDRut+3wJutXcQVOf2KU+XuHs5XuKkd5R7dQIXwOIrU="; }; # leave this in, so users don't have to constantly update their downstream patch handling @@ -203,6 +217,7 @@ in python.pkgs.buildPythonApplication rec { src = ./patches/ffmpeg-path.patch; ffmpeg = "${lib.getBin ffmpeg}/bin/ffmpeg"; }) + ./patches/wilight-import.patch ]; postPatch = let @@ -212,15 +227,16 @@ in python.pkgs.buildPythonApplication rec { "bcrypt" "cryptography" "httpx" + "orjson" "PyJWT" "requests" ]; in '' sed -r -i \ ${lib.concatStringsSep "\n" (map (package: - ''-e 's@${package}[<>=]+.*@${package}@g' \'' + ''-e 's/${package}[<>=]+.*/${package}",/g' \'' ) relaxedConstraints)} - setup.cfg + pyproject.toml substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"' ''; @@ -239,13 +255,13 @@ in python.pkgs.buildPythonApplication rec { httpx ifaddr jinja2 + lru-dict + orjson pip pyjwt python-slugify - pytz pyyaml requests - ruamel-yaml voluptuous voluptuous-serialize yarl diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index 7180b284e2ceb..f92314f83df05 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 = "20220601.0"; + version = "20220706.0"; format = "wheel"; src = fetchPypi { @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "home_assistant_frontend"; dist = "py3"; python = "py3"; - sha256 = "sha256-WGRKJq429fIxZQJzVK2xFqXUNrIYbCjr2zTSzpBlakI="; + sha256 = "sha256-hTdfe+S9D6Grtku5AkRJpCNBvYv2JspSPmXRHHfEPrA="; }; # there is nothing to strip in this package diff --git a/pkgs/servers/home-assistant/patches/wilight-import.patch b/pkgs/servers/home-assistant/patches/wilight-import.patch new file mode 100644 index 0000000000000..2d6626b974381 --- /dev/null +++ b/pkgs/servers/home-assistant/patches/wilight-import.patch @@ -0,0 +1,52 @@ +diff --git a/homeassistant/components/wilight/__init__.py b/homeassistant/components/wilight/__init__.py +index 2cdcf20c1e..37b034c9ae 100644 +--- a/homeassistant/components/wilight/__init__.py ++++ b/homeassistant/components/wilight/__init__.py +@@ -2,7 +2,7 @@ + + from typing import Any + +-from pywilight.wilight_device import Device as PyWiLightDevice ++from pywilight.wilight_device import PyWiLightDevice + + from homeassistant.config_entries import ConfigEntry + from homeassistant.const import Platform +diff --git a/homeassistant/components/wilight/fan.py b/homeassistant/components/wilight/fan.py +index c598e6db39..3d0c6d0ff3 100644 +--- a/homeassistant/components/wilight/fan.py ++++ b/homeassistant/components/wilight/fan.py +@@ -13,7 +13,7 @@ from pywilight.const import ( + WL_SPEED_LOW, + WL_SPEED_MEDIUM, + ) +-from pywilight.wilight_device import Device as PyWiLightDevice ++from pywilight.wilight_device import PyWiLightDevice + + from homeassistant.components.fan import DIRECTION_FORWARD, FanEntity, FanEntityFeature + from homeassistant.config_entries import ConfigEntry +diff --git a/homeassistant/components/wilight/light.py b/homeassistant/components/wilight/light.py +index ea9e19dcb3..2509dc5073 100644 +--- a/homeassistant/components/wilight/light.py ++++ b/homeassistant/components/wilight/light.py +@@ -4,7 +4,7 @@ from __future__ import annotations + from typing import Any + + from pywilight.const import ITEM_LIGHT, LIGHT_COLOR, LIGHT_DIMMER, LIGHT_ON_OFF +-from pywilight.wilight_device import Device as PyWiLightDevice ++from pywilight.wilight_device import PyWiLightDevice + + from homeassistant.components.light import ( + ATTR_BRIGHTNESS, +diff --git a/homeassistant/components/wilight/parent_device.py b/homeassistant/components/wilight/parent_device.py +index 17a33fef63..8091e78cc7 100644 +--- a/homeassistant/components/wilight/parent_device.py ++++ b/homeassistant/components/wilight/parent_device.py +@@ -5,7 +5,7 @@ import asyncio + import logging + + import pywilight +-from pywilight.wilight_device import Device as PyWiLightDevice ++from pywilight.wilight_device import PyWiLightDevice + import requests + + from homeassistant.config_entries import ConfigEntry diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index 488ce35a16450..6d21e6a6eed24 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -11,6 +11,7 @@ let config = [ pydispatcher ]; generic = [ av ]; google_translate = [ mutagen ]; + homeassistant_yellow = [ bellows zha-quirks zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp ]; lovelace = [ PyChromecast ]; nest = [ av ]; onboarding = [ pymetno radios rpi-bad-power ]; @@ -36,13 +37,31 @@ let # homeassistant.components.roku.media_player:media_player.py:428 Media type music is not supported with format None (mime: audio/x-matroska) "test_services_play_media_audio" ]; + rfxtrx = [ + # bytearrray mismatch + "test_rfy_cover" + ]; }; extraPytestFlagsArray = { asuswrt = [ - # asuswrt/test_config_flow.py: Sandbox network limitations, fails with unexpected error + # Sandbox network limitations, fails with unexpected error "--deselect tests/components/asuswrt/test_config_flow.py::test_on_connect_failed" ]; + history_stats = [ + # Flaky: AssertionError: assert '0.0' == '12.0' + "--deselect tests/components/history_stats/test_sensor.py::test_end_time_with_microseconds_zeroed" + ]; + skybell = [ + # Sandbox network limitations: Cannot connect to host cloud.myskybell.com:443 + "--deselect tests/components/skybell/test_config_flow.py::test_flow_user_unknown_error" + ]; + stream = [ + # Tries to write to /example and gets "Permission denied" + "--deselect tests/components/stream/test_recorder.py::test_record_lookback" + "--deselect tests/components/stream/test_recorder.py::test_recorder_log" + "--deselect tests/components/stream/test_worker.py::test_get_image" + ]; }; in lib.listToAttrs (map (component: lib.nameValuePair component ( home-assistant.overridePythonAttrs (old: { @@ -72,9 +91,8 @@ in lib.listToAttrs (map (component: lib.nameValuePair component ( meta = old.meta // { broken = lib.elem component [ - "bsblan" + "blebox" # all tests fail with: AttributeError: Mock object has no attribute 'async_from_host' "dnsip" - "efergy" "ssdp" "subaru" ]; |