<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decode_door(packet, channel=1):
 """Decode a door sensor."""

    val = str(packet.get(QSDATA, ''))
    if len(val) == 6 and val.startswith('46') and channel == 1:
        return val[-1] == '0'
    return None