diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index 0ca910575915..34624c3f8b2d 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -150,6 +150,124 @@ let type = "module"; }) cfg.customLovelaceModules; }; + + componentsUsingBluetooth = [ + # Components that require the AF_BLUETOOTH address family + "august" + "august_ble" + "airthings_ble" + "aranet" + "bluemaestro" + "bluetooth" + "bluetooth_adapters" + "bluetooth_le_tracker" + "bluetooth_tracker" + "bthome" + "default_config" + "eufylife_ble" + "esphome" + "fjaraskupan" + "gardena_bluetooth" + "govee_ble" + "homekit_controller" + "inkbird" + "improv_ble" + "keymitt_ble" + "ld2410_ble" + "leaone" + "led_ble" + "medcom_ble" + "melnor" + "moat" + "mopeka" + "motionblinds_ble" + "oralb" + "private_ble_device" + "qingping" + "rapt_ble" + "ruuvi_gateway" + "ruuvitag_ble" + "sensirion_ble" + "sensorpro" + "sensorpush" + "shelly" + "snooz" + "switchbot" + "thermobeacon" + "thermopro" + "tilt_ble" + "xiaomi_ble" + "yalexs_ble" + ]; + componentsUsingPacketCapture = [ + "default_config" # includes dhcp + "dhcp" + ]; + componentsUsingPing = [ + # Components that require the capset syscall for the ping wrapper + "ping" + "wake_on_lan" + ]; + componentsUsingSerialDevices = [ + # Components that require access to serial devices (/dev/tty*) + # List generated from home-assistant documentation: + # git clone https://github.com/home-assistant/home-assistant.io/ + # cd source/_integrations + # rg "/dev/tty" -l | cut -d'/' -f3 | cut -d'.' -f1 | sort + # And then extended by references found in the source code, these + # mostly the ones using config flows already. + "acer_projector" + "alarmdecoder" + "aurora_abb_powerone" + "blackbird" + "bryant_evolution" + "crownstone" + "deconz" + "dsmr" + "edl21" + "elkm1" + "elv" + "enocean" + "homeassistant_hardware" + "homeassistant_yellow" + "firmata" + "flexit" + "gpsd" + "insteon" + "kwb" + "lacrosse" + "landisgyr_heat_meter" + "modbus" + "modem_callerid" + "mysensors" + "nad" + "numato" + "nut" + "opentherm_gw" + "otbr" + "rainforst_raven" + "rflink" + "rfxtrx" + "scsgate" + "serial" + "serial_pm" + "sms" + "upb" + "usb" + "velbus" + "w800rf32" + "zha" + "zwave" + "zwave_js" + + # Custom components, maintained manually. + "amshan" + "benqprojector" + ]; + componentsUsingInputDevices = [ + # Components that require access to input devices (/dev/input/*) + "keyboard_remote" + ]; in { imports = [ @@ -808,6 +926,10 @@ in "CAP_NET_ADMIN" "CAP_NET_RAW" ] + ++ optionals (any useComponent componentsUsingPacketCapture) [ + # Raw packet capture using AF_PACKET + "CAP_NET_RAW" + ] ++ optionals (useComponent "emulated_hue") [ # Alexa looks for the service on port 80 # https://www.home-assistant.io/integrations/emulated_hue @@ -820,119 +942,6 @@ in "CAP_NET_RAW" ] ); - componentsUsingBluetooth = [ - # Components that require the AF_BLUETOOTH address family - "august" - "august_ble" - "airthings_ble" - "aranet" - "bluemaestro" - "bluetooth" - "bluetooth_adapters" - "bluetooth_le_tracker" - "bluetooth_tracker" - "bthome" - "default_config" - "eufylife_ble" - "esphome" - "fjaraskupan" - "gardena_bluetooth" - "govee_ble" - "homekit_controller" - "inkbird" - "improv_ble" - "keymitt_ble" - "ld2410_ble" - "leaone" - "led_ble" - "medcom_ble" - "melnor" - "moat" - "mopeka" - "motionblinds_ble" - "oralb" - "private_ble_device" - "qingping" - "rapt_ble" - "ruuvi_gateway" - "ruuvitag_ble" - "sensirion_ble" - "sensorpro" - "sensorpush" - "shelly" - "snooz" - "switchbot" - "thermobeacon" - "thermopro" - "tilt_ble" - "xiaomi_ble" - "yalexs_ble" - ]; - componentsUsingPing = [ - # Components that require the capset syscall for the ping wrapper - "ping" - "wake_on_lan" - ]; - componentsUsingSerialDevices = [ - # Components that require access to serial devices (/dev/tty*) - # List generated from home-assistant documentation: - # git clone https://github.com/home-assistant/home-assistant.io/ - # cd source/_integrations - # rg "/dev/tty" -l | cut -d'/' -f3 | cut -d'.' -f1 | sort - # And then extended by references found in the source code, these - # mostly the ones using config flows already. - "acer_projector" - "alarmdecoder" - "aurora_abb_powerone" - "blackbird" - "bryant_evolution" - "crownstone" - "deconz" - "dsmr" - "edl21" - "elkm1" - "elv" - "enocean" - "homeassistant_hardware" - "homeassistant_yellow" - "firmata" - "flexit" - "gpsd" - "insteon" - "kwb" - "lacrosse" - "landisgyr_heat_meter" - "modbus" - "modem_callerid" - "mysensors" - "nad" - "numato" - "nut" - "opentherm_gw" - "otbr" - "rainforst_raven" - "rflink" - "rfxtrx" - "scsgate" - "serial" - "serial_pm" - "sms" - "upb" - "usb" - "velbus" - "w800rf32" - "zha" - "zwave" - "zwave_js" - - # Custom components, maintained manually. - "amshan" - "benqprojector" - ]; - componentsUsingInputDevices = [ - # Components that require access to input devices (/dev/input/*) - "keyboard_remote" - ]; in { ExecStart = escapeSystemdExecArgs ( @@ -1009,6 +1018,9 @@ in ] ++ optionals (any useComponent componentsUsingBluetooth) [ "AF_BLUETOOTH" + ] + ++ optionals (any useComponent componentsUsingPacketCapture) [ + "AF_PACKET" ]; RestrictNamespaces = true; RestrictRealtime = true; @@ -1031,9 +1043,11 @@ in ]; UMask = "0077"; }; - path = [ - pkgs.unixtools.ping # needed for ping - ]; + path = + with pkgs; + lib.optionals (useComponent "go2rtc") [ pkgs.go2rtc ] + ++ lib.optionals (useComponent "picotts") [ pkgs.picotts ] + ++ lib.optionals (any useComponent componentsUsingPing) [ unixtools.ping ]; }; systemd.targets.home-assistant = rec { diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix index feb464b33ade..bc9c173f04d6 100644 --- a/nixos/tests/home-assistant.nix +++ b/nixos/tests/home-assistant.nix @@ -11,7 +11,10 @@ in meta.maintainers = lib.teams.home-assistant.members; nodes.hass = - { pkgs, ... }: + { + pkgs, + ... + }: { services.postgresql = { enable = true; @@ -24,6 +27,9 @@ in ]; }; + # required for dbus activation in the bluetooth component + hardware.bluetooth.enable = true; + services.home-assistant = { enable = true; inherit configDir; @@ -77,9 +83,30 @@ in # configure the recorder component to use the postgresql db recorder.db_url = "postgresql://@/hass"; - # without these some components that are loaded anyway fail to find - # their dependencies - default_config = { }; + # this is effecitvely default_config (2026.5.0), but with components + # skipped that would cause ERRORs in the sandbox + bluetooth = { }; + cloud = { }; + conversation = { }; + dhcp = { }; + energy = { }; + file = { }; + # Requires go2rtc service + # go2rtc = { }; + history = { }; + # Requires DNS and HTTP queries + # homeassistant_alerts = { }; + logbook = { }; + media_source = { }; + mobile_app = { }; + my = { }; + ssdp = { }; + stream = { }; + sun = { }; + usage_prediction = { }; + usb = { }; + webhook = { }; + zeroconf = { }; # include some popular integrations, that absolutely shouldn't break knx = { }; diff --git a/pkgs/development/python-modules/axis/default.nix b/pkgs/development/python-modules/axis/default.nix index 1099087afc3b..a10cad6d8569 100644 --- a/pkgs/development/python-modules/axis/default.nix +++ b/pkgs/development/python-modules/axis/default.nix @@ -15,7 +15,7 @@ buildPythonPackage (finalAttrs: { pname = "axis"; - version = "69"; + version = "70"; pyproject = true; disabled = pythonOlder "3.14"; @@ -24,7 +24,7 @@ buildPythonPackage (finalAttrs: { owner = "Kane610"; repo = "axis"; tag = "v${finalAttrs.version}"; - hash = "sha256-igeDyGKG235ooe/QrHjbya9WTCzwC8GfMoCwtpaBlR8="; + hash = "sha256-LfWnqYtmQLh1ZhSnLrx40ZfilhUoi9qbd0TgWpehlAg="; }; postPatch = '' diff --git a/pkgs/development/python-modules/blebox-uniapi/default.nix b/pkgs/development/python-modules/blebox-uniapi/default.nix index 5ea12bfc5043..197784dc6e91 100644 --- a/pkgs/development/python-modules/blebox-uniapi/default.nix +++ b/pkgs/development/python-modules/blebox-uniapi/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "blebox-uniapi"; - version = "2.5.2"; + version = "2.5.3"; pyproject = true; src = fetchFromGitHub { owner = "blebox"; repo = "blebox_uniapi"; tag = "v${version}"; - hash = "sha256-+XdUteik6VDPXWgO9vDC34n2fIIDMUI5jTYzs/qCpLU="; + hash = "sha256-DBkd8o2jOVCH3KqJ2FZ4qhJsSMb1UwqBO1ZXoTLsqEY="; }; postPatch = '' diff --git a/pkgs/development/python-modules/holidays/default.nix b/pkgs/development/python-modules/holidays/default.nix index 6784d9b15084..38aea828a10b 100644 --- a/pkgs/development/python-modules/holidays/default.nix +++ b/pkgs/development/python-modules/holidays/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, chameleon, fetchFromGitHub, + gitpython, importlib-metadata, lingva, numpy, @@ -15,14 +16,14 @@ buildPythonPackage (finalAttrs: { pname = "holidays"; - version = "0.95"; + version = "0.96"; pyproject = true; src = fetchFromGitHub { owner = "vacanza"; repo = "python-holidays"; tag = "v${finalAttrs.version}"; - hash = "sha256-MyTOCHQw/TYvH9Xm3UcXHjza2f/2ICbb3vcTGt1Cpgg="; + hash = "sha256-tsDGtNAF69EzE4cs0j1PeLZBITvy04kG8MUKD2aNWx0="; }; build-system = [ @@ -31,6 +32,7 @@ buildPythonPackage (finalAttrs: { # l10n lingva chameleon + gitpython polib ]; diff --git a/pkgs/development/python-modules/pyoverkiz/default.nix b/pkgs/development/python-modules/pyoverkiz/default.nix index 1375a365b892..5de8ce6263ff 100644 --- a/pkgs/development/python-modules/pyoverkiz/default.nix +++ b/pkgs/development/python-modules/pyoverkiz/default.nix @@ -15,14 +15,14 @@ buildPythonPackage (finalAttrs: { pname = "pyoverkiz"; - version = "1.20.2"; + version = "1.20.3"; pyproject = true; src = fetchFromGitHub { owner = "iMicknl"; repo = "python-overkiz-api"; tag = "v${finalAttrs.version}"; - hash = "sha256-6KcxtHO+mwyKyb2MGGY80M40o2OKwLYPBANipb3ySAY="; + hash = "sha256-pl7SL0lE/+eWTv6jmoilDVtaI2TB42YSpIbrY0fcptk="; }; build-system = [ hatchling ]; diff --git a/pkgs/development/python-modules/python-bsblan/default.nix b/pkgs/development/python-modules/python-bsblan/default.nix index 59b44dfbec9a..efcce1b04d49 100644 --- a/pkgs/development/python-modules/python-bsblan/default.nix +++ b/pkgs/development/python-modules/python-bsblan/default.nix @@ -19,14 +19,14 @@ buildPythonPackage (finalAttrs: { pname = "python-bsblan"; - version = "5.2.0"; + version = "5.2.1"; pyproject = true; src = fetchFromGitHub { owner = "liudger"; repo = "python-bsblan"; tag = "v${finalAttrs.version}"; - hash = "sha256-rp75cUDlciibMCpEEXn6zta6kquwCwXstRkA9A7JJYc="; + hash = "sha256-wK6r1fWXpbPVpUqLaLRjKKB2beXftdHujRL4pq3bhjc="; }; postPatch = '' diff --git a/pkgs/development/python-modules/pytibber/default.nix b/pkgs/development/python-modules/pytibber/default.nix index 3c04332f26fe..f81aa25b3cb8 100644 --- a/pkgs/development/python-modules/pytibber/default.nix +++ b/pkgs/development/python-modules/pytibber/default.nix @@ -12,14 +12,14 @@ buildPythonPackage (finalAttrs: { pname = "pytibber"; - version = "0.37.4"; + version = "0.37.5"; pyproject = true; src = fetchFromGitHub { owner = "Danielhiversen"; repo = "pyTibber"; tag = finalAttrs.version; - hash = "sha256-xXZLMLPlOYCDO1+b3/lL5O5NI5UA+4HX+YOMHLwCbig="; + hash = "sha256-6b4f2IR/jkIwhdlrG8HZjIktmKLFs6iB6RZbQAOo7Yc="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/serialx/default.nix b/pkgs/development/python-modules/serialx/default.nix index b95486ac7663..15b6680e6972 100644 --- a/pkgs/development/python-modules/serialx/default.nix +++ b/pkgs/development/python-modules/serialx/default.nix @@ -20,14 +20,14 @@ buildPythonPackage (finalAttrs: { pname = "serialx"; - version = "1.7.0"; + version = "1.7.2"; pyproject = true; src = fetchFromGitHub { owner = "puddly"; repo = "serialx"; tag = "v${finalAttrs.version}"; - hash = "sha256-yULTP7aaA/O7cz3NBMpdIybvply3ADQZENxjuexKxo8="; + hash = "sha256-A8LdFpxnnluAlwVvNly4IfvCS8eZMDil6OmI4b9kGOA="; }; cargoDeps = rustPlatform.fetchCargoVendor { diff --git a/pkgs/development/python-modules/zha/default.nix b/pkgs/development/python-modules/zha/default.nix index 869c1fa5e121..d494ad4ed2e2 100644 --- a/pkgs/development/python-modules/zha/default.nix +++ b/pkgs/development/python-modules/zha/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "zha"; - version = "1.3.0"; + version = "1.3.1"; pyproject = true; disabled = pythonOlder "3.12"; @@ -32,7 +32,7 @@ buildPythonPackage rec { owner = "zigpy"; repo = "zha"; tag = version; - hash = "sha256-oB4vxq/DJjmypmcKS6IeYEh+dTvC0Wt9X79vPbtDJgE="; + hash = "sha256-JYwTDD3YmHPgSSwFTGhoL9MY5SZ2jLBlgGqQDEnvF1k="; }; postPatch = '' diff --git a/pkgs/development/python-modules/zigpy/default.nix b/pkgs/development/python-modules/zigpy/default.nix index db72b8d1fcd9..1bed1e893dc2 100644 --- a/pkgs/development/python-modules/zigpy/default.nix +++ b/pkgs/development/python-modules/zigpy/default.nix @@ -24,14 +24,14 @@ buildPythonPackage rec { pname = "zigpy"; - version = "1.4.0"; + version = "1.4.1"; pyproject = true; src = fetchFromGitHub { owner = "zigpy"; repo = "zigpy"; tag = version; - hash = "sha256-iBv7FKPeVzHc8xNvRLHDgWAuwHgTf4ByI1fA6Z134v8="; + hash = "sha256-9e+n4C2ViCAHFw2Ed+NxPSAbcVX5KJl7biIIsYr8E4c="; }; postPatch = '' diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index f7c9b1d6d3ca..1d6ef8b616ab 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 = "2026.5.0"; + version = "2026.5.1"; components = { "3_day_blinds" = ps: with ps; [ diff --git a/pkgs/servers/home-assistant/custom-components/dreo/package.nix b/pkgs/servers/home-assistant/custom-components/dreo/package.nix index f87f1e76f1a5..1835c4fee487 100644 --- a/pkgs/servers/home-assistant/custom-components/dreo/package.nix +++ b/pkgs/servers/home-assistant/custom-components/dreo/package.nix @@ -28,6 +28,10 @@ buildHomeAssistantComponent rec { pytestCheckHook ]; + pytestFlags = [ + "-Wignore::pytest.PytestRemovedIn9Warning" + ]; + passthru.updateScript = nix-update-script { }; meta = { diff --git a/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix b/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix index e4c2cc79fdd9..8565ff7b7d1f 100644 --- a/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix +++ b/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix @@ -30,6 +30,11 @@ buildHomeAssistantComponent rec { # tests try to open sockets "test_manual_flow_ac_device" "test_manual_flow_cc_device" + # lingering datacoordinator timer on test teardown + "test_refresh_apply_race_condition" + "test_refresh_apply_race_condition_with_proxy" + "test_group5_entity_request_enable" + "test_energy_sensor_request_enable" ]; meta = { diff --git a/pkgs/servers/home-assistant/custom-components/octopus_energy/package.nix b/pkgs/servers/home-assistant/custom-components/octopus_energy/package.nix index 8b26b86637a2..fbd3497d1b82 100644 --- a/pkgs/servers/home-assistant/custom-components/octopus_energy/package.nix +++ b/pkgs/servers/home-assistant/custom-components/octopus_energy/package.nix @@ -28,6 +28,10 @@ buildHomeAssistantComponent rec { mock ]; + pytestFlags = [ + "-Wignore::pytest.PytestRemovedIn9Warning" + ]; + disabledTestPaths = [ # Integration tests require a valid Octopus Energy API Key # https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/blob/develop/CONTRIBUTING.md#integration-tests diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index d22a0639d3b0..faefbc37df74 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -262,7 +262,7 @@ let extraBuildInputs = extraPackages python.pkgs; # Don't forget to run update-component-packages.py after updating - hassVersion = "2026.5.0"; + hassVersion = "2026.5.1"; in python.pkgs.buildPythonApplication rec { @@ -283,13 +283,13 @@ python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; tag = version; - hash = "sha256-RrXjrwl6BQzjilKluAM8oVihmZqLBpVLWN/OhaJY+1c="; + hash = "sha256-aOiJPhTaJZGbY4P9iPiIe/PrRU+IDQTNS1JFhAJyH4w="; }; # Secondary source is pypi sdist for translations sdist = fetchPypi { inherit pname version; - hash = "sha256-SXsJqYETHp92ZC/I2jS2ZlerUVVTugFdbOhLCxoLJ9I="; + hash = "sha256-Hp7jYLHMQbqYmuQVH/7XPmV6tgBdhCZXpNhmchxHCUg="; }; build-system = with python.pkgs; [ diff --git a/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix b/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix index 3af655e51534..a041f7e6c158 100644 --- a/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix +++ b/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "pytest-homeassistant-custom-component"; - version = "0.13.329"; + version = "0.13.330"; pyproject = true; disabled = pythonOlder "3.13"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "MatthewFlamm"; repo = "pytest-homeassistant-custom-component"; tag = version; - hash = "sha256-ZE/zBXWk/GXBQAJ94pBjrW2GTburiMqlvkcjCFi4NLU="; + hash = "sha256-d+wRZPHdSIjXe6vqC8P85nuThQsiEu/qA3CuIOajsZ0="; }; build-system = [ setuptools ]; diff --git a/pkgs/servers/home-assistant/stubs.nix b/pkgs/servers/home-assistant/stubs.nix index 44f1983a0620..3aba4a0529f4 100644 --- a/pkgs/servers/home-assistant/stubs.nix +++ b/pkgs/servers/home-assistant/stubs.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "homeassistant-stubs"; - version = "2026.5.0"; + version = "2026.5.1"; pyproject = true; disabled = python.version != home-assistant.python.version; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "KapJI"; repo = "homeassistant-stubs"; tag = version; - hash = "sha256-awpDHL58GAO1Ijyg+wiSe/E+3XvNpN39GcSUj1cMuVY="; + hash = "sha256-ZETq0RWm5lEYTnOj7eb6u8SKol3zJBNc6ywLD3sNxmk="; }; build-system = [