diff --git a/pkgs/development/python-modules/loqedapi/default.nix b/pkgs/development/python-modules/loqedapi/default.nix new file mode 100644 index 000000000000..332edd1c0112 --- /dev/null +++ b/pkgs/development/python-modules/loqedapi/default.nix @@ -0,0 +1,49 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools +, wheel +}: + +buildPythonPackage rec { + pname = "loqedapi"; + version = "2.1.8"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "cpolhout"; + repo = "loqedAPI"; + rev = "refs/tags/v${version}"; + hash = "sha256-9ekZ98GazH1tna4JT5SEUETKR227UYRIBBghdj+TFB4="; + }; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ]; + + # Tests require network access + doCheck = false; + + pythonImportsCheck = [ + "loqedAPI" + ]; + + meta = with lib; { + description = "Module to interact with the Loqed Smart Door Lock API"; + homepage = "https://github.com/cpolhout/loqedAPI"; + changelog = "https://github.com/cpolhout/loqedAPI/releases/tag/v${version}"; + license = licenses.bsd2; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 46f48bacb630..6507be291a7e 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2404,10 +2404,11 @@ hass-nabucasa hassil home-assistant-intents + loqedapi mutagen pyturbojpeg webrtc-noise-gain - ]; # missing inputs: loqedAPI + ]; "lovelace" = ps: with ps; [ ]; "luci" = ps: with ps; [ @@ -5350,6 +5351,7 @@ "logi_circle" "london_air" "lookin" + "loqed" "lovelace" "luftdaten" "lutron_caseta" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b035887f9b67..3ec4e7b76a25 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6367,6 +6367,8 @@ self: super: with self; { looseversion = callPackage ../development/python-modules/looseversion { }; + loqedapi = callPackage ../development/python-modules/loqedapi { }; + losant-rest = callPackage ../development/python-modules/losant-rest { }; lrcalc-python = callPackage ../development/python-modules/lrcalc-python { };