def command_msg(housecode, command):
        """Create an X10 message to send the house code and a command code."""
        house_byte = 0
        if isinstance(housecode, str):
            house_byte = insteonplm.utils.housecode_to_byte(housecode) << 4
        elif isinstance(housecode, int) and housecode < 16:
            house_byte = housecode << 4
        else:
            house_byte = housecode
        return X10Received(house_byte + command, 0x80)
def command_msg ( housecode , command ) : house_byte = 0 if isinstance ( housecode , str ) : house_byte = insteonplm . utils . housecode_to_byte ( housecode ) << 4 elif isinstance ( housecode , int ) and housecode < 16 : house_byte = housecode << 4 else : house_byte = housecode return X10Received ( house_byte + command , 0x80 )
Create an X10 message to send the house code and a command code.