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; 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..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,20 +3,28 @@ buildHomeAssistantComponent, fetchFromGitHub, hahomematic, + home-assistant, }: 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="; }; + 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 ];