diff --git a/pkgs/development/python-modules/pyfronius/default.nix b/pkgs/development/python-modules/pyfronius/default.nix new file mode 100644 index 000000000000..be226d744b8b --- /dev/null +++ b/pkgs/development/python-modules/pyfronius/default.nix @@ -0,0 +1,37 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyfronius"; + version = "0.5.2"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "nielstron"; + repo = pname; + rev = version; + sha256 = "013nlxbpicm4d07q8cjkbwh6xbji8am5la9vv5iqjyk0h4c2hgr7"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pyfronius" ]; + + meta = with lib; { + description = "Python module to communicate with Fronius Symo"; + homepage = "https://github.com/nielstron/pyfronius"; + 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 dbe9c938c678..123984e66a49 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -287,7 +287,7 @@ "fritzbox" = ps: with ps; [ pyfritzhome ]; "fritzbox_callmonitor" = ps: with ps; [ fritzconnection ]; "fritzbox_netmonitor" = ps: with ps; [ fritzconnection ]; - "fronius" = ps: with ps; [ ]; # missing inputs: pyfronius + "fronius" = ps: with ps; [ pyfronius ]; "frontend" = ps: with ps; [ aiohttp-cors home-assistant-frontend pillow ]; "frontier_silicon" = ps: with ps; [ ]; # missing inputs: afsapi "futurenow" = ps: with ps; [ pyfnip ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f77b3f265a5f..c8d101cc282d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5952,6 +5952,8 @@ in { pyfritzhome = callPackage ../development/python-modules/pyfritzhome { }; + pyfronius = callPackage ../development/python-modules/pyfronius { }; + pyftdi = callPackage ../development/python-modules/pyftdi { }; pyftgl = callPackage ../development/python-modules/pyftgl { };