From 745e7e83e3b8ec41e612003a3be7dd4c90115a47 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 11 May 2025 16:08:47 +0200 Subject: [PATCH] home-assistant-custom-components.solax_modbus: fix incompatibility with latest pymodbus version The pymodbus API changed. Without this change, solax_modbus fails to start. --- .../custom-components/solax_modbus/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/home-assistant/custom-components/solax_modbus/package.nix b/pkgs/servers/home-assistant/custom-components/solax_modbus/package.nix index c44f1eb7d506..664d8c13f4ac 100644 --- a/pkgs/servers/home-assistant/custom-components/solax_modbus/package.nix +++ b/pkgs/servers/home-assistant/custom-components/solax_modbus/package.nix @@ -17,6 +17,12 @@ buildHomeAssistantComponent rec { hash = "sha256-fgvhF+1fz3pNOZJQjf/iF2Lh9j6mMkUXjgLyCja84K0="; }; + postPatch = '' + substituteInPlace custom_components/solax_modbus/payload.py --replace-fail \ + 'from pymodbus.utilities import (' \ + 'from pymodbus.pdu.pdu import (' + ''; + dependencies = [ pymodbus ]; meta = {