From fc67f52c814d25c27ccc02481cd55d9cf5646eb8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Jan 2024 16:10:17 +0100 Subject: python311Packages.switchbot-api: init at 2.0.0 An asynchronous library to use Switchbot API https://github.com/SeraphicCorp/py-switchbot-api --- .../python-modules/switchbot-api/default.nix | 45 ++++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/switchbot-api/default.nix (limited to 'pkgs') diff --git a/pkgs/development/python-modules/switchbot-api/default.nix b/pkgs/development/python-modules/switchbot-api/default.nix new file mode 100644 index 0000000000000..32df6d5185ca4 --- /dev/null +++ b/pkgs/development/python-modules/switchbot-api/default.nix @@ -0,0 +1,45 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "switchbot-api"; + version = "2.0.0"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "SeraphicCorp"; + repo = "py-switchbot-api"; + rev = "refs/tags/v${version}"; + hash = "sha256-QM8oVfd+hdVNdhOgI3ujyY82Im0Yr5Nl+OcqzEtZ7XE="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + # Module has no tests + doCheck= false; + + pythonImportsCheck = [ + "switchbot_api" + ]; + + meta = with lib; { + description = "An asynchronous library to use Switchbot API"; + homepage = "https://github.com/SeraphicCorp/py-switchbot-api"; + changelog = "https://github.com/SeraphicCorp/py-switchbot-api/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4177ee78eb41f..2eb495a2d9efd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13988,6 +13988,8 @@ self: super: with self; { swagger-ui-bundle = callPackage ../development/python-modules/swagger-ui-bundle { }; + switchbot-api = callPackage ../development/python-modules/switchbot-api { }; + swift = callPackage ../development/python-modules/swift { }; swisshydrodata = callPackage ../development/python-modules/swisshydrodata { }; -- cgit 1.4.1 From 1cde59afe650673e65ec809e0ef6fa3f2c958459 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Jan 2024 16:11:51 +0100 Subject: home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgs') diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 44e9f1c5211bf..26e4dc0949501 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4756,7 +4756,8 @@ zeroconf ]; "switchbot_cloud" = ps: with ps; [ - ]; # missing inputs: switchbot-api + switchbot-api + ]; "switcher_kis" = ps: with ps; [ aioswitcher ]; @@ -6358,6 +6359,7 @@ "switch_as_x" "switchbee" "switchbot" + "switchbot_cloud" "switcher_kis" "syncthing" "syncthru" -- cgit 1.4.1