Schneider Electric Solar TCP Modbus Integration

I have a CSW4048 with the Battery Monitor and an XW SCP as well as the Generator Start.
I would love to get this working on my Home Assistant but I am having trouble getting it to connect properly.

I have added the code @Kramos posted above and change the IP address to my system as well as set the slave to 90 for my SW4048 I also had to change the line “input_type: input” to “input_type: holding” other wise I would not get any data. But now the data makes no sense just very long strings of numbers. Any help would be greatly appreciated. It appears that the Modbus mapping is different for the SW4048. Does anyone have a link for the correct mapping. I cant find it anywhere on schneiders website.

thanks in advance for any help.