Skip to content

Commit b7e1f2f

Browse files
authored
Merge pull request #333287 from dotlambda/python3Packages.pyegps
home-assistant: support energenie_power_sockets component
2 parents d33f9ab + a8c74e9 commit b7e1f2f

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
buildPythonPackage,
3+
fetchFromGitHub,
4+
lib,
5+
pytestCheckHook,
6+
pyusb,
7+
setuptools,
8+
setuptools-scm,
9+
}:
10+
11+
buildPythonPackage rec {
12+
pname = "pyegps";
13+
version = "0.2.5";
14+
pyproject = true;
15+
16+
src = fetchFromGitHub {
17+
owner = "gnumpi";
18+
repo = "pyegps";
19+
rev = "refs/tags/v${version}";
20+
hash = "sha256-iixk2sFa4KAayKFmQKtPjvoIYgxCMXnfkliKhyO2ba4=";
21+
};
22+
23+
build-system = [
24+
setuptools
25+
setuptools-scm
26+
];
27+
28+
dependencies = [ pyusb ];
29+
30+
pythonImportsCheck = [ "pyegps" ];
31+
32+
nativeCheckInputs = [ pytestCheckHook ];
33+
34+
meta = {
35+
changelog = "https://github.com/gnumpi/pyEGPS/releases/tag/v${version}";
36+
description = "Controlling Energenie Power Strips with python";
37+
homepage = "https://github.com/gnumpi/pyegps";
38+
license = lib.licenses.asl20;
39+
maintainers = with lib.maintainers; [ dotlambda ];
40+
};
41+
}

pkgs/servers/home-assistant/component-packages.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,8 @@
10961096
sqlalchemy
10971097
];
10981098
"energenie_power_sockets" = ps: with ps; [
1099-
]; # missing inputs: pyegps
1099+
pyegps
1100+
];
11001101
"energie_vanons" = ps: with ps; [
11011102
];
11021103
"energy" = ps: with ps; [
@@ -5421,6 +5422,7 @@
54215422
"emulated_hue"
54225423
"emulated_kasa"
54235424
"emulated_roku"
5425+
"energenie_power_sockets"
54245426
"energy"
54255427
"energyzero"
54265428
"enigma2"

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11312,6 +11312,8 @@ self: super: with self; {
1131211312

1131311313
pyefergy = callPackage ../development/python-modules/pyefergy { };
1131411314

11315+
pyegps = callPackage ../development/python-modules/pyegps { };
11316+
1131511317
pyeight = callPackage ../development/python-modules/pyeight { };
1131611318

1131711319
pyelectra = callPackage ../development/python-modules/pyelectra { };

0 commit comments

Comments
 (0)