# Path: mppsolar/protocols/daly40.py
# class daly40(daly):
#     """
#     DALY - Daly40 BMS protocol handler
#     """
# 
#     def __init__(self, *args, **kwargs) -> None:
#         super().__init__()
#         self._protocol_id = b"DALY40"
#         self.module_address = bytes.fromhex("40")


import unittest
from mppsolar.protocols.daly40 import daly40 as pi
            "acquistion": [0.0, "V"],
            "Current": [2.1, "A"],
            "SOC": [88.8, "%"],
        }
        result = protocol.decode(response, command)
        # print(result)
        self.assertEqual(result, expected)

    def test_daly_cellMinMaxVoltages(self):
        """test the decode of a cellMinMaxVoltages response"""
        protocol = pi()
        response = b"\xa5\x01\x91\x08\r\x00\x0f\x0c\xfe\x01\x03x\xe1"
        command = "cellMinMaxVoltages"
        # needed to initialise variables
        protocol.get_full_command(command)
        expected = {
            "raw_response": ["¥\x01\x91\x08\r\x00\x0f\x0cþ\x01\x03xá", ""],
            "_command": "cellMinMaxVoltages",
            "_command_description": "Cell Minimum and Maximum Voltages",
            "Maximum Cell Voltage": [3.328, "V"],
            "Maximum Cell Number": [15, ""],
            "Minimum Cell Voltage": [3.326, "V"],
            "Minimum Cell Number": [1, ""],
        }
        result = protocol.decode(response, command)
        # print(result)
        self.assertEqual(result, expected)

    def test_daly_status(self):
        """test the decode of a status response"""

# Path: mppsolar/protocols/daly40.py
# class daly40(daly):
#     """
#     DALY - Daly40 BMS protocol handler
#     """
# 
#     def __init__(self, *args, **kwargs) -> None:
#         super().__init__()
#         self._protocol_id = b"DALY40"
#         self.module_address = bytes.fromhex("40")


# Path: tests/test_protocol_daly40.py
import unittest
from mppsolar.protocols.daly40 import daly40 as pi

            "acquistion": [0.0, "V"],
            "Current": [2.1, "A"],
            "SOC": [88.8, "%"],
        }
        result = protocol.decode(response, command)
        # print(result)
        self.assertEqual(result, expected)

    def test_daly_cellMinMaxVoltages(self):
        """test the decode of a cellMinMaxVoltages response"""
        protocol = pi()
        response = b"\xa5\x01\x91\x08\r\x00\x0f\x0c\xfe\x01\x03x\xe1"
        command = "cellMinMaxVoltages"
        # needed to initialise variables
        protocol.get_full_command(command)
        expected = {
            "raw_response": ["¥\x01\x91\x08\r\x00\x0f\x0cþ\x01\x03xá", ""],
            "_command": "cellMinMaxVoltages",
            "_command_description": "Cell Minimum and Maximum Voltages",
            "Maximum Cell Voltage": [3.328, "V"],
            "Maximum Cell Number": [15, ""],
            "Minimum Cell Voltage": [3.326, "V"],
            "Minimum Cell Number": [1, ""],
        }
        result = protocol.decode(response, command)
        # print(result)
        self.assertEqual(result, expected)

    def test_daly_status(self):
        """test the decode of a status response"""

        protocol = pi()