def create_sunspec_sync_client(host):
 modbus = ModbusTcpClient(host)
 modbus.connect()
 client = SunspecClient(modbus)
 client.initialize()
 return client

def create_sunspec_sync_client ( host ) : modbus = ModbusTcpClient ( host ) modbus . connect ( ) client = SunspecClient ( modbus ) client . initialize ( ) return client
a quick helper method to create a sunspec client .