def decode_pir(packet, channel=1):
    """Decode a PIR."""
    val = str(packet.get(QSDATA, ''))
    if len(val) == 8 and val.startswith('0f') and channel == 1:
        return int(val[-4:], 16) > 0
    return None