Skip to content

Commit d33f9ab

Browse files
authored
Merge pull request #333267 from dotlambda/python3Packages.pyelectra
home-assistant: support electrasmart component
2 parents 1f4a6cc + 422f481 commit d33f9ab

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
aiohttp,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
lib,
6+
setuptools,
7+
}:
8+
9+
buildPythonPackage rec {
10+
pname = "pyelectra";
11+
version = "1.2.4";
12+
pyproject = true;
13+
14+
src = fetchFromGitHub {
15+
owner = "jafar-atili";
16+
repo = "pyelectra";
17+
rev = "refs/tags/${version}";
18+
hash = "sha256-3g+6AXbHMStk77k+1Qh5kgDswUZ8I627YiA/PguUGBg=";
19+
};
20+
21+
build-system = [ setuptools ];
22+
23+
dependencies = [ aiohttp ];
24+
25+
pythonImportsCheck = [ "electrasmart" ];
26+
27+
# upstream has no tests
28+
doCheck = false;
29+
30+
meta = {
31+
changelog = "https://github.com/jafar-atili/pyElectra/releases/tag/${version}";
32+
description = "Electra Smart Python Integration";
33+
homepage = "https://github.com/jafar-atili/pyelectra";
34+
license = lib.licenses.asl20;
35+
maintainers = with lib.maintainers; [ dotlambda ];
36+
};
37+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,8 @@
10371037
"eight_sleep" = ps: with ps; [
10381038
];
10391039
"electrasmart" = ps: with ps; [
1040-
]; # missing inputs: pyElectra
1040+
pyelectra
1041+
];
10411042
"electric_kiwi" = ps: with ps; [
10421043
fnv-hash-fast
10431044
psutil-home-assistant
@@ -5412,6 +5413,7 @@
54125413
"edl21"
54135414
"efergy"
54145415
"eight_sleep"
5416+
"electrasmart"
54155417
"elgato"
54165418
"elkm1"
54175419
"elmax"

pkgs/top-level/python-packages.nix

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

1131511315
pyeight = callPackage ../development/python-modules/pyeight { };
1131611316

11317+
pyelectra = callPackage ../development/python-modules/pyelectra { };
11318+
1131711319
pyelftools = callPackage ../development/python-modules/pyelftools { };
1131811320

1131911321
pyemby = callPackage ../development/python-modules/pyemby { };

0 commit comments

Comments
 (0)