diff --git a/pkgs/development/python-modules/gardena-bluetooth/default.nix b/pkgs/development/python-modules/gardena-bluetooth/default.nix new file mode 100644 index 000000000000..fb71990c99df --- /dev/null +++ b/pkgs/development/python-modules/gardena-bluetooth/default.nix @@ -0,0 +1,60 @@ +{ lib +, asyncclick +, bleak +, bleak-retry-connector +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, tzlocal +}: + +buildPythonPackage rec { + pname = "gardena-bluetooth"; + version = "1.4.1"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "elupus"; + repo = "gardena-bluetooth"; + rev = "refs/tags/${version}"; + hash = "sha256-WnurxoSzzNTNxz6S1HSKb/lTuOyox6fG2I0Hlj95Ub0="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bleak + bleak-retry-connector + tzlocal + ]; + + passthru.optional-dependencies = { + cli = [ + asyncclick + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ + "gardena_bluetooth" + ]; + + meta = with lib; { + description = "Module for interacting with Gardena Bluetooth"; + homepage = "https://github.com/elupus/gardena-bluetooth"; + changelog = "https://github.com/elupus/gardena-bluetooth/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index d51f2542082a..128aad8115e3 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1580,6 +1580,7 @@ dbus-fast esphome-dashboard-api fnv-hash-fast + gardena-bluetooth ha-ffmpeg habluetooth hassil @@ -1592,7 +1593,7 @@ sqlalchemy webrtc-noise-gain zeroconf - ]; # missing inputs: gardena-bluetooth + ]; "gaviota" = ps: with ps; [ ]; "gc100" = ps: with ps; [ @@ -5927,6 +5928,7 @@ "frontier_silicon" "fully_kiosk" "garages_amsterdam" + "gardena_bluetooth" "gdacs" "generic" "generic_hygrostat" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6c11dc55902b..80c47f2c4585 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4423,6 +4423,8 @@ self: super: with self; { gaphas = callPackage ../development/python-modules/gaphas { }; + gardena-bluetooth = callPackage ../development/python-modules/gardena-bluetooth { }; + garminconnect-aio = callPackage ../development/python-modules/garminconnect-aio { }; garminconnect = callPackage ../development/python-modules/garminconnect { };