diff --git a/pkgs/development/python-modules/aionotion/default.nix b/pkgs/development/python-modules/aionotion/default.nix new file mode 100644 index 00000000000..078184275eb --- /dev/null +++ b/pkgs/development/python-modules/aionotion/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aionotion"; + version = "3.0.1"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1ydrazg7gcwf53006n1fvxh9zm77by6zi36haq1bmy5skqccyiki"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aresponses + pytest-aiohttp + pytest-asyncio + pytest-cov + pytestCheckHook + ]; + + disabledTestPaths = [ "examples" ]; + + pythonImportsCheck = [ "aionotion" ]; + + meta = with lib; { + description = "Python library for Notion Home Monitoring"; + homepage = "https://github.com/bachya/aionotion"; + license = with 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 e9c5f2740c0..45ae821a9b8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -563,7 +563,7 @@ "norway_air" = ps: with ps; [ pymetno ]; "notify" = ps: with ps; [ ]; "notify_events" = ps: with ps; [ ]; # missing inputs: notify-events - "notion" = ps: with ps; [ ]; # missing inputs: aionotion + "notion" = ps: with ps; [ aionotion ]; "nsw_fuel_station" = ps: with ps; [ ]; # missing inputs: nsw-fuel-api-client "nsw_rural_fire_service_feed" = ps: with ps; [ ]; # missing inputs: aio_geojson_nsw_rfs_incidents "nuheat" = ps: with ps; [ ]; # missing inputs: nuheat diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 0fd906bdbe1..82bb54dd889 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -250,6 +250,7 @@ in with py.pkgs; buildPythonApplication rec { "mqtt_statestream" "mullvad" "notify" + "notion" "number" "ozw" "panel_custom" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 08e6272188a..c5f8ac703fd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -302,6 +302,8 @@ in { aionotify = callPackage ../development/python-modules/aionotify { }; + aionotion = callPackage ../development/python-modules/aionotion { }; + aioprocessing = callPackage ../development/python-modules/aioprocessing { }; aiopulse = callPackage ../development/python-modules/aiopulse { };