From f84760387fe2c6e0b18face15282dd0e5e004ae0 Mon Sep 17 00:00:00 2001 From: LKuemmel <76958050+LKuemmel@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:26:15 +0200 Subject: [PATCH] Apply suggestions from code review --- packages/modules/devices/growatt/growatt/bat.py | 3 ++- packages/modules/devices/growatt/growatt/counter.py | 3 ++- packages/modules/devices/growatt/growatt/inverter.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/modules/devices/growatt/growatt/bat.py b/packages/modules/devices/growatt/growatt/bat.py index c517be87c..335382e98 100644 --- a/packages/modules/devices/growatt/growatt/bat.py +++ b/packages/modules/devices/growatt/growatt/bat.py @@ -2,6 +2,7 @@ from typing import Dict, Union from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractBat from modules.common.component_state import BatState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -11,7 +12,7 @@ from modules.devices.growatt.growatt.version import GrowattVersion -class GrowattBat: +class GrowattBat(AbstractBat): def __init__(self, component_config: Union[Dict, GrowattBatSetup], modbus_id: int, diff --git a/packages/modules/devices/growatt/growatt/counter.py b/packages/modules/devices/growatt/growatt/counter.py index 39782d42a..af7555103 100644 --- a/packages/modules/devices/growatt/growatt/counter.py +++ b/packages/modules/devices/growatt/growatt/counter.py @@ -2,6 +2,7 @@ from typing import Dict, Union from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractCounter from modules.common.component_state import CounterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -11,7 +12,7 @@ from modules.devices.growatt.growatt.version import GrowattVersion -class GrowattCounter: +class GrowattCounter(AbstractCounter): def __init__(self, component_config: Union[Dict, GrowattCounterSetup], modbus_id: int, diff --git a/packages/modules/devices/growatt/growatt/inverter.py b/packages/modules/devices/growatt/growatt/inverter.py index 04d3d7290..6fc9f7373 100644 --- a/packages/modules/devices/growatt/growatt/inverter.py +++ b/packages/modules/devices/growatt/growatt/inverter.py @@ -2,6 +2,7 @@ from typing import Dict, Union from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractInverter from modules.common.component_state import InverterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -11,7 +12,7 @@ from modules.devices.growatt.growatt.version import GrowattVersion -class GrowattInverter: +class GrowattInverter(AbstractInverter): def __init__(self, component_config: Union[Dict, GrowattInverterSetup], modbus_id: int,