def expander_to_zone(self, address, channel, panel_type=ADEMCO):
        """
        Convert an address and channel into a zone number.

        :param address: expander address
        :type address: int
        :param channel: channel
        :type channel: int

        :returns: zone number associated with an address and channel
        """

        zone = -1

        if panel_type == ADEMCO:
            # TODO: This is going to need to be reworked to support the larger
            #       panels without fixed addressing on the expanders.

            idx = address - 7   # Expanders start at address 7.
            zone = address + channel + (idx * 7) + 1

        elif panel_type == DSC:
            zone = (address * 8) + channel

        return zone
def expander_to_zone ( self , address , channel , panel_type = ADEMCO ) : zone = - 1 if panel_type == ADEMCO : idx = address - 7 zone = address + channel + ( idx * 7 ) + 1 elif panel_type == DSC : zone = ( address * 8 ) + channel return zone
Convert an address and channel into a zone number.

        :param address: expander address
        :type address: int
        :param channel: channel
        :type channel: int

        :returns: zone number associated with an address and channel