* - fix pytest setup that can be startet from the rootdir - support python venv environment - add pytest.ini - move common settings from .vscode/settings.json into pytest.ini - add missing requirements - fix import paths for pytests * - support python venv environment * initial version * - add missing requirements python-dotenv * fix import paths for pytests * fix pytest warnings * initial version * report 5 slowest test durations * add more vscode settings for python
16 lines
529 B
Python
16 lines
529 B
Python
from asyncio import StreamReader, StreamWriter
|
|
|
|
from inverter_base import InverterBase
|
|
from gen3plus.solarman_v5 import SolarmanV5
|
|
from gen3plus.solarman_emu import SolarmanEmu
|
|
|
|
|
|
class InverterG3P(InverterBase):
|
|
def __init__(self, reader: StreamReader, writer: StreamWriter,
|
|
client_mode: bool = False):
|
|
remote_prot = None
|
|
if client_mode:
|
|
remote_prot = SolarmanEmu
|
|
super().__init__(reader, writer, 'solarman',
|
|
SolarmanV5, client_mode, remote_prot)
|