From 090b7d28bf46caa3da2867ff494ea5b337615b6a Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 9 May 2026 21:31:18 -0700 Subject: [PATCH 1/2] python3Packages.pyteleinfo: init at 0.4.0 --- .../python-modules/pyteleinfo/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/pyteleinfo/default.nix diff --git a/pkgs/development/python-modules/pyteleinfo/default.nix b/pkgs/development/python-modules/pyteleinfo/default.nix new file mode 100644 index 000000000000..15f3a227417d --- /dev/null +++ b/pkgs/development/python-modules/pyteleinfo/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + pydantic-settings, + pyserial, + pyserial-asyncio-fast, + pyhamcrest, + pytest-asyncio, + pytest-cov-stub, + pytest-mock, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "pyteleinfo"; + version = "0.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "esciara"; + repo = "pyteleinfo"; + tag = "v${finalAttrs.version}"; + hash = "sha256-uNkCunWlFoGmg80t69z2PXyPL1pGDsezTc8heec97VI="; + }; + + build-system = [ hatchling ]; + + pythonRelaxDeps = [ "pydantic-settings" ]; + + dependencies = [ + pydantic-settings + pyserial + pyserial-asyncio-fast + ]; + + nativeCheckInputs = [ + pyhamcrest + pytest-asyncio + pytest-cov-stub + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "teleinfo" ]; + + meta = { + description = "Python library for decoding and encoding ENEDIS teleinfo frames"; + homepage = "https://github.com/esciara/pyteleinfo"; + changelog = "https://github.com/esciara/pyteleinfo/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6764c6b7795e..f32ed99f5771 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15295,6 +15295,8 @@ self: super: with self; { pytelegrambotapi = callPackage ../development/python-modules/pyTelegramBotAPI { }; + pyteleinfo = callPackage ../development/python-modules/pyteleinfo { }; + pytenable = callPackage ../development/python-modules/pytenable { }; pytensor = callPackage ../development/python-modules/pytensor { }; From dc51a6dcc5e523597db213718d98440b6f3d8eb4 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 9 May 2026 21:33:43 -0700 Subject: [PATCH 2/2] home-assistant: update component packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 1d6ef8b616ab..04af0a467488 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -6346,8 +6346,9 @@ "teleinfo" = ps: with ps; [ aiousbwatcher + pyteleinfo serialx - ]; # missing inputs: pyteleinfo + ]; "tellduslive" = ps: with ps; [ tellduslive @@ -8376,6 +8377,7 @@ "tedee" "telegram" "telegram_bot" + "teleinfo" "tellduslive" "teltonika" "temper"