From 391a61633b2444359ed0b688887e7a468ac65537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 15 Dec 2024 13:54:41 -0800 Subject: [PATCH 1/3] Revert "home-assistant-custom-components.homematicip_local: 1.73.0 -> 1.74.0" This reverts commit c7ea95dbe45dd7c5da31e089b538258ee74e37e0. --- .../custom-components/homematicip_local/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix b/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix index 857867e349ad4..b460d17488242 100644 --- a/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix +++ b/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix @@ -8,13 +8,13 @@ buildHomeAssistantComponent rec { owner = "danielperna84"; domain = "homematicip_local"; - version = "1.74.0"; + version = "1.73.0"; src = fetchFromGitHub { owner = "danielperna84"; repo = "custom_homematic"; rev = "refs/tags/${version}"; - hash = "sha256-UdM/T68VK3Dh585rm3qnZ9LtRgpumfzk4TaGGIfYdoM="; + hash = "sha256-1ssmaX6G03i9KYgjCRMZqOG2apEZ0069fQnmVy2BVhA="; }; dependencies = [ From 7211564ef728517a95f1067adde6aac0a2bd7d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 15 Dec 2024 13:54:49 -0800 Subject: [PATCH 2/3] Revert "python312Packages.hahomematic: 2024.12.0 -> 2024.12.2" This reverts commit 3527ace86e76c4413d758fb438596da958c0beee. --- pkgs/development/python-modules/hahomematic/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hahomematic/default.nix b/pkgs/development/python-modules/hahomematic/default.nix index 3b068917c652e..63a93a7ed5b70 100644 --- a/pkgs/development/python-modules/hahomematic/default.nix +++ b/pkgs/development/python-modules/hahomematic/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "hahomematic"; - version = "2024.12.2"; + version = "2024.12.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "danielperna84"; repo = "hahomematic"; rev = "refs/tags/${version}"; - hash = "sha256-pQiOi6uJcfeBOPmL9MksHLqnemHD9Qk6e7QTI9J3NCc="; + hash = "sha256-RLgJiapsRM8dMA4+T2S6DkSFjo+YBmVVpo1mOVKJ7EI="; }; __darwinAllowLocalNetworking = true; From d70e297ef7ad32038045617210dfe576fe3bfd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 15 Dec 2024 13:51:27 -0800 Subject: [PATCH 3/3] home-assistant-custom-components.homematicip_local: fail if Home Assistant is too old --- .../custom-components/homematicip_local/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix b/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix index b460d17488242..6c99b07f4c3ac 100644 --- a/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix +++ b/pkgs/servers/home-assistant/custom-components/homematicip_local/package.nix @@ -3,6 +3,7 @@ buildHomeAssistantComponent, fetchFromGitHub, hahomematic, + home-assistant, }: buildHomeAssistantComponent rec { @@ -17,6 +18,13 @@ buildHomeAssistantComponent rec { hash = "sha256-1ssmaX6G03i9KYgjCRMZqOG2apEZ0069fQnmVy2BVhA="; }; + postPatch = '' + min_ha_version="$(sed -nr 's/^HMIP_LOCAL_MIN_HA_VERSION.*= "([0-9.]+)"$/\1/p' custom_components/homematicip_local/const.py)" + test \ + "$(printf '%s\n' "$min_ha_version" "${home-assistant.version}" | sort -V | head -n1)" = "$min_ha_version" \ + || (echo "error: only Home Assistant >= $min_ha_version is supported" && exit 1) + ''; + dependencies = [ hahomematic ];