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 = {