From a3eca489bcadd8ca972c8a1ccd3182c465f713e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 14:12:47 +0200 Subject: [PATCH 1/3] python3Packages.greeclimate: init at 0.11.8 --- .../python-modules/greeclimate/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/greeclimate/default.nix diff --git a/pkgs/development/python-modules/greeclimate/default.nix b/pkgs/development/python-modules/greeclimate/default.nix new file mode 100644 index 000000000000..5b2e86b5fb58 --- /dev/null +++ b/pkgs/development/python-modules/greeclimate/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, netifaces +, pycryptodome +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "greeclimate"; + version = "0.11.8"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "cmroche"; + repo = "greeclimate"; + rev = version; + sha256 = "1n46klbhl0gpd5x995mrcr1qfd77hrfm501qns1zhvv0zk8mdsf4"; + }; + + propagatedBuildInputs = [ + netifaces + pycryptodome + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "greeclimate" + "greeclimate.device" + "greeclimate.discovery" + "greeclimate.exceptions" + "greeclimate.network" + ]; + + meta = with lib; { + description = "Discover, connect and control Gree based minisplit systems"; + homepage = "https://github.com/cmroche/greeclimate"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ccb14530a0c..ed66f594d0e0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3029,6 +3029,8 @@ in { greatfet = callPackage ../development/python-modules/greatfet { }; + greeclimate = callPackage ../development/python-modules/greeclimate { }; + green = callPackage ../development/python-modules/green { }; greenlet = callPackage ../development/python-modules/greenlet { }; From f12303432c0dcdcae624806dda223dc83d16ec17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 14:13:26 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c7aa936c3233..aecceb51b525 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -327,7 +327,7 @@ "gpsd" = ps: with ps; [ gps3 ]; "gpslogger" = ps: with ps; [ aiohttp-cors ]; "graphite" = ps: with ps; [ ]; - "gree" = ps: with ps; [ ]; # missing inputs: greeclimate + "gree" = ps: with ps; [ greeclimate ]; "greeneye_monitor" = ps: with ps; [ ]; # missing inputs: greeneye_monitor "greenwave" = ps: with ps; [ ]; # missing inputs: greenwavereality "group" = ps: with ps; [ ]; From bbb92f6dd9540a444b887d3bf165fda1c8fa30dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 14:15:20 +0200 Subject: [PATCH 3/3] home-assistant: test gree component --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index dcb426f0359e..946768dc2505 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -409,6 +409,7 @@ in with py.pkgs; buildPythonApplication rec { "google_wifi" "gpslogger" "graphite" + "gree" "group" "growatt_server" "guardian"