From ad1a2c16dd5a608e2e4a7a471f5a1b1fe27eae71 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 6 Jun 2026 20:53:18 -0700 Subject: [PATCH 1/2] python3Packages.lg-rs232-tv: init at 1.2.0 --- .../python-modules/lg-rs232-tv/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/lg-rs232-tv/default.nix diff --git a/pkgs/development/python-modules/lg-rs232-tv/default.nix b/pkgs/development/python-modules/lg-rs232-tv/default.nix new file mode 100644 index 000000000000..0b259670027d --- /dev/null +++ b/pkgs/development/python-modules/lg-rs232-tv/default.nix @@ -0,0 +1,54 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + uv-build, + serialx, + aiowebostv, + pytest-asyncio, + pytest-timeout, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "lg-rs232-tv"; + version = "1.2.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = "lg-rs232-tv"; + tag = finalAttrs.version; + hash = "sha256-gMjRyZ/gUMAsS0v465ISD38YAlrOB8N/5VAFZkXtyAE="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.8.4,<0.9.0" "uv_build" + ''; + + build-system = [ uv-build ]; + + dependencies = [ serialx ]; + + optional-dependencies = { + esphome = serialx.optional-dependencies.esphome; + remote = [ aiowebostv ]; + }; + + nativeCheckInputs = [ + pytest-asyncio + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ "lg_rs232_tv" ]; + + meta = { + description = "Async library to control LG TVs over RS232"; + homepage = "https://github.com/home-assistant-libs/lg-rs232-tv"; + changelog = "https://github.com/home-assistant-libs/lg-rs232-tv/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 89ca0b58fe5f..ef334c91f49d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8789,6 +8789,8 @@ self: super: with self; { lexilang = callPackage ../development/python-modules/lexilang { }; + lg-rs232-tv = callPackage ../development/python-modules/lg-rs232-tv { }; + lgpio = toPythonModule ( pkgs.lgpio.override { inherit buildPythonPackage; From bb23471cb34bd44ff984758a491da223141f6ae4 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 6 Jun 2026 20:54:29 -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 71b1cac92d68..fbf9e08c93b4 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -3610,8 +3610,9 @@ "lg_tv_rs232" = ps: with ps; [ aiousbwatcher + lg-rs232-tv serialx - ]; # missing inputs: lg-rs232-tv + ]; "libre_hardware_monitor" = ps: with ps; [ librehardwaremonitor-api @@ -8228,6 +8229,7 @@ "lg_netcast" "lg_soundbar" "lg_thinq" + "lg_tv_rs232" "libre_hardware_monitor" "lichess" "lidarr"